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
Built Distribution
File details
Details for the file onomancer-0.0.5.tar.gz
.
File metadata
- Download URL: onomancer-0.0.5.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edda0d5cfade18ad0e30239e1f3167ac2d6d1d91825439df2255830ee2eeda95 |
|
MD5 | 4d40b3f3c833b2762f4314b3be8fe5bc |
|
BLAKE2b-256 | 32b57e8e9cabc1488ac435eebc848504729b815c1108a83f48272570cc5cb4a8 |
File details
Details for the file onomancer-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: onomancer-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04d0b1bce57ffb44a4dd01e2073743097a133d65fc03629d8fcd6aa9f80512e8 |
|
MD5 | fb4232358e8c0b9ab948594b431d19fa |
|
BLAKE2b-256 | 694a787417e42384e7953074688aa7f0ab1c050d303a52e47a1b5abe7cdebe43 |