Skip to content

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

License

Notifications You must be signed in to change notification settings

irobson/jgenderize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages