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 gender_lookup.json
created from combining data provided from the Social Security Administration and World Intellectual Property Organization located in the data folder. 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.1.tar.gz
(4.7 MB
view hashes)
Built Distribution
Close
Hashes for onomancer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81a50f26b5cfc92556844ce0e4c469fda0edc29d17d5a6a540f6afcaa4017d28 |
|
MD5 | f2579dfdcb75615d5d6378b5a6ded5a9 |
|
BLAKE2b-256 | 28ea530e604ac9df29ecdd96a947fcc421e8a480e3d059490b6108b48bcfc42c |