Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

parthmaul/onomancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onomancer

onomancer is an open source python package for inferring gender from first names for feature engineering. Name-Gender mappings are based on lookups in the F.txt, M.txt, N.txt files located in the data folder created from combining data provided from the Social Security Administration and World Intellectual Property Organization. If a Name-Gender mapping does not exist, the gender is predicted from a pre-trained model named model.bin also located in the data folder.

Requirements

onomancer requires:

  • python >= 3.6.x.
  • fasttext == 0.9.2 (to load pre-trained model)

Installing

$ pip install onomancer

Usage

$ python
>>> import onomancer as ono
>>> ono.predict(['GALADRIEL', 'GanDALF'])
{'GANDALF': 'M', 'GALADRIEL': 'F'}

About

Lookup and predict gender from first names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages