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.4.tar.gz
(5.3 MB
view hashes)
Built Distribution
Close
Hashes for onomancer-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba1f5c0e8646b63b8bff1729d1f728225e9afa2099a9ee3ab0447daeee3c0289 |
|
MD5 | 85e949c6039ae4363fee2301eff4c8b1 |
|
BLAKE2b-256 | cd2ab9e5b55a2ac6a266d985f90052b2c0bd438ad5c8e8a36a2f174109a2962f |