latrhino.blogg.se

Combining words to make a new word generator
Combining words to make a new word generator













Then it repeats the process, looking for chunks that start with fi and repeating the process as described above until the word reaches the requested length. If it started with maf and then selected afi, then the word-in-progress would be mafi. For example, the portmanteau brunch refers to a. Once it's selected a chunk, it appends the last letter of that chunk to the word it's building. Portmanteau, pronounced port-man-tow, refers to a new word made from two words and their meanings. homograph: A word that is spelled the same as another but has a different. In this case, the sum of the frequencies is 101, so aff, which has a frequency of 43, has a 43 out of 101 chance of being selected &emdash a bit less than 43%. hyphen: The symbol -, typically used to join two or more words to form a new word. The script selects a chunk randomly, but weights each one by their frequency. Next, it finds all other chunks in which the first 2 characters match the last 2 characters of the initial chunk &emdash if it started out with maf, it would look for all chunks starting with af to see how often each one appears in the original source text:

combining words to make a new word generator

To generate a word, the script picks a random 3-letter chunk to start with. A tally is kept of how often each 3-letter chunk occurs in the text. Given the word explain, it would get the "chunks" exp, xpl, pla, lai, and ain.

combining words to make a new word generator

The sample text is broken up into individual words, and then each word is broken up into overlapping 3-letter chunks.

#COMBINING WORDS TO MAKE A NEW WORD GENERATOR FULL#

The words are generated based on the frequency with which any given sequence of characters occurs in a language, based on data from a sample text (for example, for English, I used the full text of a public domain novel from Project Gutenberg).













Combining words to make a new word generator