Generative model for names.
Project description
naamkaran: generative model for names
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.
Installation
Naamkaran can be installed from PyPI using pip:
pip install naamkaran
For development with all tools:
pip install -e ".[dev,test]"
For web applications (Gradio/Flask):
pip install "naamkaran[web]"
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 (default: "a")
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file naamkaran-0.2.0.tar.gz.
File metadata
- Download URL: naamkaran-0.2.0.tar.gz
- Upload date:
- Size: 511.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81dbc0e55b7b68644e6cfb6a472d4db3bf8382afe6f0af85ae8675a977f7f065
|
|
| MD5 |
47f2eab091fe94b39df140f6f2726e9b
|
|
| BLAKE2b-256 |
8e0cefcad5a806a596a354243498a552f2bc6caa0c178ba565c1530e0fdc04cd
|
Provenance
The following attestation bundles were made for naamkaran-0.2.0.tar.gz:
Publisher:
python-publish.yml on appeler/naamkaran
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
naamkaran-0.2.0.tar.gz -
Subject digest:
81dbc0e55b7b68644e6cfb6a472d4db3bf8382afe6f0af85ae8675a977f7f065 - Sigstore transparency entry: 590952080
- Sigstore integration time:
-
Permalink:
appeler/naamkaran@5940efaca24bc82fd4ecb568f3c6ec5de17d12c3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/appeler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5940efaca24bc82fd4ecb568f3c6ec5de17d12c3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file naamkaran-0.2.0-py3-none-any.whl.
File metadata
- Download URL: naamkaran-0.2.0-py3-none-any.whl
- Upload date:
- Size: 509.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcf5b120e22bcadc19157e9d9a7ab5fd1ce68efcf058efaaca03ccb0b4633f09
|
|
| MD5 |
5953d9889067adb0d4e40506de24907c
|
|
| BLAKE2b-256 |
f699254286beccbffc843a803059c409f9a20345a22648604415ff34c4125601
|
Provenance
The following attestation bundles were made for naamkaran-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on appeler/naamkaran
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
naamkaran-0.2.0-py3-none-any.whl -
Subject digest:
dcf5b120e22bcadc19157e9d9a7ab5fd1ce68efcf058efaaca03ccb0b4633f09 - Sigstore transparency entry: 590952091
- Sigstore integration time:
-
Permalink:
appeler/naamkaran@5940efaca24bc82fd4ecb568f3c6ec5de17d12c3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/appeler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5940efaca24bc82fd4ecb568f3c6ec5de17d12c3 -
Trigger Event:
workflow_dispatch
-
Statement type: