nimegenerator is a random name/word generator.
A word is constructed letter by letter, substring by substring. Depending on the last letter, a random letter will be chosen to follow it.
Some letters have higher and lower chances to be chosen. This probabillity is for every letter each.
For example:
-
e
is rarely followed bya
or anothere
, but often followed by anr
orl
-
p
is rarely followed byn
, but often followed by ane
ora
These rules are hardcoded for defaults, but can be overridden with custom config files. Config files are json files and examples can be found in ./examples/
!
This is a library-binary hybrid. This means you can build an executable for use in the terminal or import it into your own Nim projects.
-
nimble:
nimble install nimegenerator
-
git:
git clone https://github.com/nirokay/nimegenerator && cd nimegenerator && nimble install
# Prints 10 random words:
nimegenerator
# Prints 5 random words:
nimegenerator 5
# Help message:
nimegenerator --help
nimegenerator -h
# Version printout:
nimegenerator --version
nimegenerator -v
# Load custom config file and print random words:
nimegenerator --configfile:/path/to/file
nimegenerator -c:/path/to/file
nimegenerator -c:/path/to/file 10
Simply import it like any other module!
import nimegenerator
echo generateWord()
For detailed documentation, please visit the nim generated docs!