/jgenderize

Simple Java extension to know the gender of a given first name. It consumes the http://genderize.io API.

Primary LanguageJavaMIT LicenseMIT

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"));