naamkaran: generative model for names
Naamkaran is a character-level LSTM that generates synthetic name-like strings. It was trained on names from early 2022 Florida voter registration data.
Use the outputs for demonstrations, testing, and exploratory applications. They are not verified personal names or representative population samples. The model can reproduce spelling patterns, imbalance, errors, and social biases in the training data. Its binary gender conditioning does not represent the full range of gender identities. Do not use its outputs to infer identity, ethnicity, citizenship, eligibility, or another sensitive attribute.
Gradio App.
Installation
Naamkaran can be installed from PyPI using pip:
pip install naamkaran
For development with all tools:
uv sync --all-groups --all-extras
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)
max_attempts Maximum candidates to sample before failing
# 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
The trained model and vocabulary are published at gojiberries/naamkaran. Naamkaran downloads the artifacts from an immutable Hugging Face commit on first use and verifies their SHA-256 hashes against the packaged model_manifest.json. Set NAAMKARAN_MODEL_DIR to use an explicitly managed local copy. The Hugging Face client honors its standard authentication configuration, including HF_TOKEN.
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.
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.3.0.tar.gz.
File metadata
- Download URL: naamkaran-0.3.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c35b4c9d13c0a2b03debc905e55f343066a8f39b599dc9fe191b2bd77f387bc
|
|
| MD5 |
13bad4bf81bf41c344abf5f588133bae
|
|
| BLAKE2b-256 |
a604de9147eb9abaed924d5d7b85f8d62a124eeb4683bc4c683cfaf9f91bf224
|
Provenance
The following attestation bundles were made for naamkaran-0.3.0.tar.gz:
Publisher:
release.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.3.0.tar.gz -
Subject digest:
1c35b4c9d13c0a2b03debc905e55f343066a8f39b599dc9fe191b2bd77f387bc - Sigstore transparency entry: 2500431285
- Sigstore integration time:
-
Permalink:
appeler/naamkaran@870d455ff0f00075c6df83ce6ace71622e9f8d9a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/appeler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@870d455ff0f00075c6df83ce6ace71622e9f8d9a -
Trigger Event:
push
-
Statement type:
File details
Details for the file naamkaran-0.3.0-py3-none-any.whl.
File metadata
- Download URL: naamkaran-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b4925f037328da1c42e53ab903858da20475ca525a9b9a0c7f37a788a4ac4c8
|
|
| MD5 |
c0bc06ee116f7ce6a4d0790ec8d1a374
|
|
| BLAKE2b-256 |
e58841f53a4e94110fa7c22b13414f34ece9d4d92ed44c8ed1fffe35f9b32754
|
Provenance
The following attestation bundles were made for naamkaran-0.3.0-py3-none-any.whl:
Publisher:
release.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.3.0-py3-none-any.whl -
Subject digest:
9b4925f037328da1c42e53ab903858da20475ca525a9b9a0c7f37a788a4ac4c8 - Sigstore transparency entry: 2500431291
- Sigstore integration time:
-
Permalink:
appeler/naamkaran@870d455ff0f00075c6df83ce6ace71622e9f8d9a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/appeler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@870d455ff0f00075c6df83ce6ace71622e9f8d9a -
Trigger Event:
push
-
Statement type: