This is a name generator that uses word lists of common names to generate new ones.
Why? Because it's pretty hilarious.
Python 2 or 3 (the latter is recommended) and Numpy is needed to run.
namegenerator.py
takes two optional arguments:
- The number of names to be generated (default 1)
- The "seed" that every generated name starts with
If run without arguments, it simply prints one generated name and exits.
$ ./namegenerator.py
Erinde
$ ./namegenerator.py 5
Enn
Joll
Andr
Rikandelisp
Culoa
$ ./namegenerator.py 5 Er
Erofann
Ergn
Erimicus
Ericilikal
Erisol
By default, the files swedish-female-firstnames.csv
and swedish-female-firstnames.csv
are used as input.
The files are space-separated, with names in the first column and relative frequency in the second, for example
Alice 2.1
Bob 1.8
The data included in the repository is from Statistics Sweden (Statistiska Centralbyrån, some data-mangling done by me) and The United States Census Bureau (the files are taken as-is from that link).
If running under Python 2, non-ASCII characters are not handled properly. As far as I can tell, it works fine under Python 3.