Skip to main content

Generative model for names.

Project description

naamkaran: generative model for names

https://github.com/appeler/naamkaran/actions/workflows/python-package.yml/badge.svg https://img.shields.io/pypi/v/naamkaran.svg https://static.pepy.tech/badge/naamkaran

Naamkaran is a generative model for names. It is based on a character-level RNN trained on names from the Florida Voter Registration Data.

Gradio App.

Naamkaran on HF

Installation

Naamkaran can be installed from PyPI using pip:

pip install naamkaran

General API

The general API for naamkaran is as follows:

# naamkaran is the package name
from naamkaran.generate import generate_names

# generate_names is the function that generates names

positional arguments:
  start_letter  The letter to start the name with

optional arguments:
    end_letter  The letter to end the name with (default: None)
    how_many    The number of names to generate (default: 1)
    max_length  The maximum length of the name (default: 5)
    gender      The gender of the name (default: "M")
    temperature The temperature of the model (default: 0.5)

# generate 10 names starting with 'A'
generate_names('A', how_many=10)
['Allis', 'Alber', 'Aderi', 'Albri', 'Alawa',
'Arver', 'Agnee', 'Anous', 'Areyd', 'Adria']


# generate 10 names starting with 'B' and ending with 'n'
generate_names('B', end_letter='n', how_many=10)
['Brian', 'Beran', 'Burin', 'Bahan', 'Balin',
'Bounn', 'Baran', 'Balan', 'Belin', 'Brion']

# generate 5 names starting with 'B' and ending with 'n' with a maximum length of 4
generate_names('B', end_letter='n', how_many=5, max_length=4)
['Bern', 'Bren', 'Bran', 'Bonn', 'Brun']

# generate 10 names starting with 'D' and ending with 'd' with a maximum length of 6
# and a temperature of 0.5
generate_names('D', end_letter='d', how_many=5, max_length=6, temperature=0.5)
['Derayd', 'Davind', 'Deland', 'Denild', 'David']

# generate 10 female names starting with 'A' and ending with 'e' with a maximum length of 5
# and a temperature of 0.5
generate_names('A', end_letter='e', how_many=10, max_length=5, gender="F", temperature=0.5)
['Annhe', 'Annie', 'Altre', 'Anne', 'Ashle',
'Arine', 'Anice', 'Andre', 'Anale', 'Allie']

Data

The model is trained on names from the Florida Voter Registration Data from early 2022. The data are available on the Harvard Dataverse

Authors

Rajashekar Chintalapati and Gaurav Sood

Contributing

Contributions are welcome. Please open an issue if you find a bug or have a feature request.

License

The package is released under the MIT License.

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

naamkaran-0.0.2.tar.gz (595.4 kB view details)

Uploaded Source

Built Distribution

naamkaran-0.0.2-py2.py3-none-any.whl (595.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file naamkaran-0.0.2.tar.gz.

File metadata

  • Download URL: naamkaran-0.0.2.tar.gz
  • Upload date:
  • Size: 595.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for naamkaran-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a2f715b0800406f51def046610d1d4acdc154cfb72630339eda3daa3769af7f1
MD5 be1779a5c4c0b66007433a1d103bc344
BLAKE2b-256 f8df5e66df65255ed8ee1ea5dc771ecba82110ce7f9a87a0be9733cbc0d32c1c

See more details on using hashes here.

File details

Details for the file naamkaran-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: naamkaran-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 595.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for naamkaran-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 135c668f0600c408f86e6a06def0a0741d96ae34f1de3a4a12e142da7933bd8c
MD5 c8fc974eba8733ad731af1b73778f060
BLAKE2b-256 1e8eb3f5eeaffb852b5b021400877a567a6aa4309a903d350d746c806fcf562f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page