genderator311


Namegenderator311 JSON
Version 0.2.8.1 PyPI version JSON
download
home_pagehttps://github.com/xumixprto/genderator311
SummaryPython library to guess gender given a spanish full name for Python 3.11+
upload_time2025-07-31 01:46:19
maintainerNone
docs_urlNone
authorDavid Moreno-Garcia (mantained by Diego Delgado)
requires_pythonNone
licenseMIT
keywords gender guess spanish name
VCS
bugtrack_url
requirements unidecode
Travis-CI No Travis.
coveralls test coverage No coveralls.
            genderator
==========
.. image:: https://img.shields.io/travis/davidmogar/genderator.svg
   :target: https://travis-ci.org/davidmogar/genderator
.. image:: https://img.shields.io/coveralls/davidmogar/genderator.svg
   :target: https://coveralls.io/r/davidmogar/genderator
.. image:: https://img.shields.io/pypi/v/genderator.svg
   :target: https://pypi.python.org/pypi/genderator
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
   :target: https://github.com/davidmogar/genderator/blob/master/LICENSE
.. image:: https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg
   :target: https://gitter.im/davidmogar/genderator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge

Genderator is a Python library to process Spanish names (from Spain) to guess their
gender.

For this to work, the libray uses the next datasets from `Instituto
Nacional de EstadĂ­stica <http://www.ine.es>`_:

-  **name\_surname\_ratio**: List of words that could be both, a name or
   a surname, and shows the probability to be a surname.
-  **names\_ine**: List of registered names on Spain, with the
   probability for each one to be a male or a female name.
-  **surnames\_ine**: List of registeres surnames on Spain.

Installation
------------

The easiest way to install the latest version is by using pip to pull it
from `PyPI <https://pypi.python.org/pypi/genderator311>`_:

::

    pip install genderator311

You may also use Git to clone the repository from Github and install it
manually:

::

    git clone https://github.com/xumixprto/genderator311.git
    cd genderator
    python setup.py install

Python 3.11+ are supported.

Usage
-----

The next code shows a sample usage of this library:

.. code:: python

    import genderator

    guesser = genderator.Parser()
    answer = guesser.guess_gender('David Moreno GarcĂ­a')
    if answer:
        print(answer)
    else:
        print('Name doesn\'t match')

Output
------

.. code::

    OrderedDict([
        ('names', ['david']),
        ('surnames', ['moreno', 'garcia']),
        ('real_name', 'david'),
        ('gender', 'Male'),
        ('confidence', 1.0)
    ])

Options
-------

Genderator's parser can receive some arguments to control its behaviour. Those arguments are:

- **force_combinations=Boolean**: Force combinations during classification.
- **force_split=Boolean**: Force name split if no surnames are detected.
- **normalize=Boolean**: Enable or disable normalization.
- **normalizer_options=Dictionary**: Normalizer options to be applied.

Normalizer options are a dictionary to control what normalization rules are applied to each name. Possible options are:

- **hyphens**: Boolean option to enable or disable hyphens removal.
- **symbols**: Boolean option to enable or disable symbols removal.
- **whitespaces**: Boolean option to enable or disable extra whitespaces removal.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xumixprto/genderator311",
    "name": "genderator311",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "gender, guess, spanish, name",
    "author": "David Moreno-Garcia (mantained by Diego Delgado)",
    "author_email": "ddelgado.1405@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/67/07/02989a5928f9a36345947c3bb832c421ffb2be0fed7c35b5b5b11e24bc31/genderator311-0.2.8.1.tar.gz",
    "platform": null,
    "description": "genderator\n==========\n.. image:: https://img.shields.io/travis/davidmogar/genderator.svg\n   :target: https://travis-ci.org/davidmogar/genderator\n.. image:: https://img.shields.io/coveralls/davidmogar/genderator.svg\n   :target: https://coveralls.io/r/davidmogar/genderator\n.. image:: https://img.shields.io/pypi/v/genderator.svg\n   :target: https://pypi.python.org/pypi/genderator\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://github.com/davidmogar/genderator/blob/master/LICENSE\n.. image:: https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg\n   :target: https://gitter.im/davidmogar/genderator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\n\nGenderator is a Python library to process Spanish names (from Spain) to guess their\ngender.\n\nFor this to work, the libray uses the next datasets from `Instituto\nNacional de Estad\u00edstica <http://www.ine.es>`_:\n\n-  **name\\_surname\\_ratio**: List of words that could be both, a name or\n   a surname, and shows the probability to be a surname.\n-  **names\\_ine**: List of registered names on Spain, with the\n   probability for each one to be a male or a female name.\n-  **surnames\\_ine**: List of registeres surnames on Spain.\n\nInstallation\n------------\n\nThe easiest way to install the latest version is by using pip to pull it\nfrom `PyPI <https://pypi.python.org/pypi/genderator311>`_:\n\n::\n\n    pip install genderator311\n\nYou may also use Git to clone the repository from Github and install it\nmanually:\n\n::\n\n    git clone https://github.com/xumixprto/genderator311.git\n    cd genderator\n    python setup.py install\n\nPython 3.11+ are supported.\n\nUsage\n-----\n\nThe next code shows a sample usage of this library:\n\n.. code:: python\n\n    import genderator\n\n    guesser = genderator.Parser()\n    answer = guesser.guess_gender('David Moreno Garc\u00eda')\n    if answer:\n        print(answer)\n    else:\n        print('Name doesn\\'t match')\n\nOutput\n------\n\n.. code::\n\n    OrderedDict([\n        ('names', ['david']),\n        ('surnames', ['moreno', 'garcia']),\n        ('real_name', 'david'),\n        ('gender', 'Male'),\n        ('confidence', 1.0)\n    ])\n\nOptions\n-------\n\nGenderator's parser can receive some arguments to control its behaviour. Those arguments are:\n\n- **force_combinations=Boolean**: Force combinations during classification.\n- **force_split=Boolean**: Force name split if no surnames are detected.\n- **normalize=Boolean**: Enable or disable normalization.\n- **normalizer_options=Dictionary**: Normalizer options to be applied.\n\nNormalizer options are a dictionary to control what normalization rules are applied to each name. Possible options are:\n\n- **hyphens**: Boolean option to enable or disable hyphens removal.\n- **symbols**: Boolean option to enable or disable symbols removal.\n- **whitespaces**: Boolean option to enable or disable extra whitespaces removal.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library to guess gender given a spanish full name for Python 3.11+",
    "version": "0.2.8.1",
    "project_urls": {
        "Download": "https://github.com/xumixprto/genderator311/archive/refs/tags/v0.2.8.1.tar.gz",
        "Homepage": "https://github.com/xumixprto/genderator311"
    },
    "split_keywords": [
        "gender",
        " guess",
        " spanish",
        " name"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b3cbdb7943c7fdbe04966e9f457d935ed6fa4f6d6d1cc8347a5129c8decf2c07",
                "md5": "9cd5cb02d7eeeff1eaa8d98774e6d520",
                "sha256": "f585fe1c9d764f09b61f94b502ff28e29894f99c6dccc47973115e551d3dfed5"
            },
            "downloads": -1,
            "filename": "genderator311-0.2.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9cd5cb02d7eeeff1eaa8d98774e6d520",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 879310,
            "upload_time": "2025-07-31T01:46:16",
            "upload_time_iso_8601": "2025-07-31T01:46:16.631753Z",
            "url": "https://files.pythonhosted.org/packages/b3/cb/db7943c7fdbe04966e9f457d935ed6fa4f6d6d1cc8347a5129c8decf2c07/genderator311-0.2.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "670702989a5928f9a36345947c3bb832c421ffb2be0fed7c35b5b5b11e24bc31",
                "md5": "819056f91f5f0284067c3b72bb20b35b",
                "sha256": "11eea60fed0ac0b8af35af2eaac35636356791aacd665ce92c79c9f211d99ff6"
            },
            "downloads": -1,
            "filename": "genderator311-0.2.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "819056f91f5f0284067c3b72bb20b35b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 882585,
            "upload_time": "2025-07-31T01:46:19",
            "upload_time_iso_8601": "2025-07-31T01:46:19.031360Z",
            "url": "https://files.pythonhosted.org/packages/67/07/02989a5928f9a36345947c3bb832c421ffb2be0fed7c35b5b5b11e24bc31/genderator311-0.2.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-31 01:46:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xumixprto",
    "github_project": "genderator311",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "unidecode",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        }
    ],
    "lcname": "genderator311"
}
        
Elapsed time: 0.48595s