js-ngrams

Generative model for creating brand new words and names

View project on GitHub

The Basics

Generate a random new word or name based on English words and English spellings of names of places, such as

 

Advanced

Training Set Details

The above word generator is trained with words, while the name generator trained with names. The list of names and words were pulled from a linux systems's english words file.

The generator produces new words randomly by sequentially requesting letters. Each letter requested is the result of a random variable that is influenced by the previous two letters in the sequence. This influence provides the generator with the ability to randomly create new words that follow similar spelling guidelines to English words.

In more straightforward terms, each letter is drawn based on what letters are already in the word. Consider that 'th' is a common piece of a word in English. Therefore if the previous letter is 't' there's a decent chance the next will be 'h'.

Select training

I provided two data sets for training the generator. They are the proper nouns and regular nouns from a linux word list file.



Generate new word (or name)

Generate a word given the data input used for training.

number of characters to generate:

New word:

License

Apache License 2.0

Support or Contact

Follow @pstrinkle