Does anyone know of a good library for mapping a person's name to his or her gender? [closed] Does anyone know of a good library for mapping a person's name to his or her gender? [closed] database database

Does anyone know of a good library for mapping a person's name to his or her gender? [closed]


gender.c is an open source C program that does a good job.It comes with data for 44568 first names from all around the world.There is good documentation and a description of the file format (basically plain text)so it should not be to difficult to read it from your own application.

Here is what the author says:

A few words on quality of data

The dictionary of first names has been prepared with utmost care.For example, the Turkish, Indian and Korean names in this dictionaryhave all been independently classified by several native speakers.I also took special care to list only those names which can currentlybe found.

The lesson from this?

Any modifications should be done very cautiously (and they must alsoadhere to the sorting required by the search algorithm).For example, knowing that "Sascha" is a boy's name in Germany,the author never assumed the English "Sasha" to be a girl's name.Knowing that "Jan" is a boy's name in Germany, I never assumed it to bealso a English short form of "Janet".Another case in point is the name "Esra". This is a boy's name inGermany, but a girl's name in Turkey.

The program calculates a probability for the name being male of female.It can do so with the name as input alone or with the name and country of origin,which gives significantly better results.

You can download it from the website of the German computer magazine c't40 000 Namen.The article is in German but don't worry, all documentation is English.Here is the direct ftp link 0717-182.zip if you are not interested in the article.The zip-File contains the source code, an windows executable, the databaseand the documentation.


The gender of a name is something that cannot be inferred programmatically in the general case. You need a name database. Here is a free name database from the US Census Bureau.

EDIT: The link for the 2010 name is dead but there are working links and a libraries in the comments.


"I tell ya, life ain't easy for a boy named 'Sue.'"

...So, why make it any harder? If you need to know the sex, just ask... Otherwise, don't worry about it.