Simple Java extension to know the gender of a given first name. It consumes the http://genderize.io API.
Branch: master
Clone or download
irobson Merge pull request #2 from squaptor/master
Fixed handling of single names which no longer require special handling.
Latest commit bb4c9c3 Aug 8, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE.txt
README.md Update readme. Aug 19, 2015
pom.xml

README.md

jGenderize

Client for genderize.io web service.

Simple Java extension to know the gender of a given first name.

What is the gender for "John" ?

Genderize api = GenderizeIoAPI.create();
NameGender gender = api.getGender("John");
System.out.println("John is: "+gender.getGender());
System.out.println("is John male? " + gender.isMale());
System.out.println("Who? " + gender.getName());

What about "John" in Brazil? Localization support.

Genderize api = GenderizeIoAPI.create();
NameGender gender = api.getGender("John", new Locale("pt", "BR"));
System.out.println("John is: "+gender.getGender());
System.out.println("is John male? " + gender.isMale());

Lots of names? It is sorted.

Genderize api = GenderizeIoAPI.create();
List<NameGender> genders = api.getGenders("Robson", "Marlise", "Gilmar");

Does it works with l10n too? Sure.

Genderize api = GenderizeIoAPI.create();
List<NameGender> genders = api.getGenders(new String[] {"ted", "marshall", "lilly", "robin", "barney", "melissa"}, new Locale("en", "US"));

Have a paid API key from store.genderize.io? Use it.

Genderize api = GenderizeIoAPI.create("your_api_key_here");
List<NameGender> genders = api.getGenders(new String[] {"ted", "marshall", "lilly", "robin", "barney", "melissa"}, new Locale("en", "US"));