EOS Name Generator - is a python package for generating names according to EOS name rules.
This includes 3 ways to generate a name:
* Random Generator
* Recurrent Neural Network Generator
* Markov Chain Generator
If you have 16.04 version, install system requirements with the following terminal commands:
$ sudo apt update && sudo apt install -y software-properties-common build-essentialInstall Python 3.7 (also, we support 3.6):
$ brew install python3Install the package from the PyPi through pip:
$ pip3 install eos-name-generatorThe algorithm selects a base word from a pre-prepared dictionary, after which an additional word of the appropriate
length is selected ADDITIONAL_WORD_LEN = EOS_NAME_LEN - BASE_WORD_LEN if there is no such word, then the additional
word is random numbers.
The probability that an additional word will be numbers can be set by the parameter numbers_probabilities.
- Can only contain the characters
.abcdefghijklmnopqrstuvwxyz12345.a-z(lowercase),1-5and.(period) - Must start with a letter
- Must be
12characters
Get the version of the package — eos-name-generator --version:
$ eos-name-generator --versionGenerate random name:
from eos_name_generator import RandomNameGenerator
if __name__ == '__main__':
generator = RandomNameGenerator()
name = generator.generate()
print(name) Generate list of random names:
from eos_name_generator import RandomNameGenerator
if __name__ == '__main__':
generator = RandomNameGenerator()
names = generator.generate_list(num=1000)
for name in names:
print(name)Generate eos random name - eos-name-generator generate name:
| Arguments | Type | Required | Description |
|---|---|---|---|
| numpy-random-provider | Bool | No | Used numpy.random as random provider instance for generation name. |
| numbers-probabilities | Float | No | The probability of occurrence of numbers in the generated word. |
| seed-data-path | String | No | Path to the data based on which the name will be generated. |
$ eos-name-generator generate name
brakesroller$ eos-name-generator generate name --numpy-random-provider
sightsilicon$ eos-name-generator generate name --numbers-probabilities 1
barges143525$ eos-name-generator generate name --seed-data-path data.txt
tamalecationGenerate list of eos random names - eos-name-generator generate names_list:
| Arguments | Type | Required | Description |
|---|---|---|---|
| num | Int | Yes | Number of generated names. |
| numpy-random-provider | Bool | No | Used numpy.random as random provider instance for generation name. |
| numbers-probabilities | Float | No | The probability of occurrence of numbers in the generated word. |
| seed-data-path | String | No | Path to the data based on which the name will be generated. |
$ eos-name-generator generate names_list --num 4
marblesmeats
seamanhiring
wonderbreast
mosseshealth$ eos-name-generator generate names_list --num 4 --numpy-random-provider
candyhalibut
strollscales
folklorepink
slaveryrotor$ eos-name-generator generate names_list --num 4 --numbers-probabilities 1
doorbell3321
sycamore1553
chaplain3431
combine25115$ eos-name-generator generate names_list --num 4 --seed-data-path data.txt
dessertsuede
reboundbrown
heaterssalad
doubterpoachClone the project and move to project folder:
$ git clone https://github.com/Alladin9393/eos-name-generator.git && cd eos-name-generatorCreate virtualenv and install requirements:
$ virtualenv venv -p python3 && source venv/bin/activate
$ pip3 install -r requirements.txt -r requirements-dev.txtTo run tests use:
$ coverage run -m pytest -vv testsWhen you have developed new functionality, check it with the following command. This command creates the Python package from source code instead of installing it from the PyPi:
$ pip3 uninstall -y eos_name_generator && rm -rf dist/ eos_name_generator.egg-info && \
python3 setup.py sdist && pip3 install dist/*.tar.gzTo build the package and upload it to PypI to be accessible through pip, use the following commands. Twine requires the username and password of the account package is going to be uploaded to.
$ python3 setup.py sdist
$ twine upload dist/*
username: alladin9393
password: ******If you want to your pull request to be review, ensure you:
If you want to your pull request to be review, ensure you: