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

Latest commit

 

History

History
20 lines (15 loc) · 867 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 867 Bytes

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'}