Skip to main content

Lookup and/or predict gender of given first name.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onomancer-0.0.5.tar.gz (4.7 MB view hashes)

Uploaded Source

Built Distribution

onomancer-0.0.5-py3-none-any.whl (4.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page