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.2.tar.gz
(5.3 MB
view hashes)
Built Distribution
Close
Hashes for onomancer-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1d58692797311fa49f86e6cb42c8987b3309c9cc6aaf55e260f7a28a1405f0 |
|
MD5 | 650e48770d05afed518bbc4f2eb42c09 |
|
BLAKE2b-256 | 1561d06f83b3491a90cb1d1534059d5a8fa54cdf462a5928bbf9399ce1c0175a |