Sexist

Java library which allows to detect person's gender by his/her first name.

License

License

Categories

Categories

eXist Data Databases
GroupId

GroupId

com.github.aistomin
ArtifactId

ArtifactId

sexist
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Sexist
Java library which allows to detect person's gender by his/her first name.
Project URL

Project URL

https://github.com/aistomin/sexist
Source Code Management

Source Code Management

https://github.com/aistomin/sexist

Download sexist

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.aistomin/sexist/ -->
<dependency>
    <groupId>com.github.aistomin</groupId>
    <artifactId>sexist</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.aistomin/sexist/
implementation 'com.github.aistomin:sexist:0.2'
// https://jarcasting.com/artifacts/com.github.aistomin/sexist/
implementation ("com.github.aistomin:sexist:0.2")
'com.github.aistomin:sexist:jar:0.2'
<dependency org="com.github.aistomin" name="sexist" rev="0.2">
  <artifact name="sexist" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.aistomin', module='sexist', version='0.2')
)
libraryDependencies += "com.github.aistomin" % "sexist" % "0.2"
[com.github.aistomin/sexist "0.2"]

Dependencies

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.3.1
org.junit.jupiter : junit-jupiter-engine jar 5.3.1

Project Modules

There are no modules declared in this project.

SexIst

Build Status Hits-of-Code codecov Maven Central javadoc

"Sexism is bad. The name of the library is derived from the word "Sex" and my surname :)" - Andrej Istomin.

Description

Java library for gender detection by person's first name. Inspired by https://github.com/ferhatelmas/sexmachine/ library for Python. Based on the data from the program "gender" by Jorg Michael (described here)

Add Maven Dependency

Add the following configuration to your project's pom.xml:

<dependencies>
    <!-- other dependencies are there -->
    <dependency>
        <groupId>com.github.aistomin</groupId>
        <artifactId>sexist</artifactId>
        <version>0.2</version>
    </dependency>
    <!-- other dependencies are there -->
</dependencies>

Quick start

Once you've added the Maven dependency you can start detecting the gender by the person's name. You may start with the default implementation of the com.github.aistomin.sexist.NamesDictionary, which is com.github.aistomin.sexist.DefaultDictionary. See the code examle:

NamesDictionary dictionary = new DefaultDictionary();
System.out.println("Andrej: " + dictionary.gender("Andrej"));
System.out.println("Emily: " + dictionary.gender("Emily"));

The output of the code above will be:

Andrej: MALE
Emily: FEMALE

Questions?

If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.

How to contribute?

Fork the repository, make changes, submit a pull request. Your changes will be reviewed and applied to the master branch, if they look correct.

Please run Maven build before submitting a pull request:

$ mvn clean install package javadoc:javadoc

Versions

Version
0.2
0.1.1
0.1