Generates random words similar to a given set of words.
A conditional probability model of the data is created and used to generate new samples. Generation can be given 2 parameters, namely:
- Minimum word length
- Maximum word length
Python3
numpy
python3 generateWords.py \<filename\> \<minimum word length\> \<maximum word length\> \<number of words to generate\>
Given a set of elven city names from Lord of the Rings (in a file called "elvenCities.txt"), output a set of elvish-like city names. In this case we want 10 city names that are between 4 and 12 characters long.
python3 generateWords.py elvenCities.txt 4 12 10
Malinyarindon
Ostha
Gloriot
Endhol
Llorguargrore
Gololl
Endendhin
Dhobey
Andedhelon
Peshiliredos
- Pedro L. Ferreira
- Thank you Mr. Tolkien đź’™