Infers gender from the indian first name or full name.
You can install using the pip package manager by running
pip install infer-gender
Alternatively, you could install the latest version directly from Github:
pip install https://github.com/bnriiitb/infer-gender/infer-gender/archive/master.zip
You can install using the conda package manager by running
conda install -c conda-forge infer-gender
Download the source code by cloning the repository or by pressing 'Download ZIP' on this page.
Install by navigating to the proper directory and running:
python setup.py install
from infer_gender import GenderPredictor
gp = GenderPredictor()
sample_names = ['katrina kaif','narendra modi','naga budigam','james bond','samantha']
predicted_genders = gp.predict_gender(sample_names)
for name,pred_gender in zip(sample_names,predicted_genders):
print('{} --> {}'.format(name,pred_gender))
katrina kaif --> Female
narendra modi --> Male
naga budigam --> Male
james bond --> Male
samantha --> Female