Skip to content

Infer gender from the Indian first name or full name

License

Notifications You must be signed in to change notification settings

bnriiitb/infer-gender

Repository files navigation

Infer Gender


Infers gender from the indian first name or full name.

Installation


Using pip

PyPi Version

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

Using conda

You can install using the conda package manager by running

conda install -c conda-forge infer-gender

From source

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

Usage


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

Releases

No releases published

Packages

No packages published