Skip to main content

A package used to generate names.

Project description

ci-cd docs PyPI version codecov License: MIT

nameforme

A helper python package that can be used to generate names based on the dateset. This could be used to come up with baby names, character names, pseudonyms, etc.

Source Data: Contains baby names born in the United States for each year from 1880 to 2017, and the number of children of each sex given each name. Names must appear at least 5 times in each year to be included. (Source: http://www.ssa.gov/oact/babynames/limits.html)

This package is similar to the existing names package by Trey Hunner (last updated in 2014), however, our uses a more recent dataset (with names up to 2017), and more options for users to customize what type of names to generate, including the ability to generate similar sounding names.

You can check the online documentation of this package on readthedocs.

Features

Note that the name of the functions is not finalized. They are subject to change.

The package is an assimilation of four independent functions:

  • find_unisex_name: Generate a random set of 10 suggested neutral baby names based on the given limitation and baby names in the past years.

  • find_old_name: Generate a random set of 10 suggested neutral(by default) baby names based on the given time period and sex.

  • find_similar_name: Generate a random set of 10 suggested similar baby names based on the syllable of the input name.

  • find_name: Generate a random set of 10 suggested baby names based on the given limitations.

Installation

$ pip install nameforme

Usage

Below is a basic example of how to use each of the four functions included in this package.

# Load all required package functions
from nameforme.nameforme import find_name
from nameforme.nameforme import find_old_name
from nameforme.nameforme import find_similar_name
from nameforme.nameforme import find_unisex_name

# Generate a random set of 10 suggested baby names based on the given limitations.
# if the given limitation can match to at least 10 names, a list of 10 names will be provided
find_name("F", "A", length=3)
#if the given limitation can only match less than 10 names, all matched names will be provided
find_name("m", "b", length=9)

# Generate a random set of suggested neutral(by default) baby names based on the given time period and sex.
find_old_name('1980s', limit=3)

# Generate a random list of names that sound similar to a given user input name.
find_similar_name('Daniel', limit=20)

# Generate the a random set of suggested neutral baby names based on the given limitation and baby names in the past years.
find_unisex_name(bar=0.02,limit=10)

Dependencies

  • python = "3.9"
  • numpy = "1.24.1"
  • pandas = "1.5.3"
  • jellyfish = "0.9.0"
  • pytest = "7.2.1"

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

nameforme was created by Daniel Cairns, Eyre Hong, Bruce Wu, Zilong Yi (UBC MDS). It is licensed under the terms of the MIT license.

Credits

nameforme was created with cookiecutter and the py-pkgs-cookiecutter template.

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

nameforme-1.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

nameforme-1.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file nameforme-1.1.0.tar.gz.

File metadata

  • Download URL: nameforme-1.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for nameforme-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2b79cd68d626d30ce00618468f9157c3c9071c8b35c11015f127afbf50feed8f
MD5 5c541d82e4e58089dd254e03286d6dce
BLAKE2b-256 c3fbe9804253920a26b809e0f206f4d3a328b17a1d9d6f8116f900f0630b483a

See more details on using hashes here.

File details

Details for the file nameforme-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: nameforme-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for nameforme-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 201b10a56e52cede9da13538b91eda494fa629b905d25452c182bf4f2816b9b8
MD5 faebf33784bda56d60b4db96ec66c11d
BLAKE2b-256 1f5b6bbbea423b2c0380ff0fa2cf39b7f50d8dc4d600414b2d50d6edd78147b7

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