A Queneau letter-chunks node module based on Leonard Richardson's algorithm
Words made from letter-chunks Many games have single-word titles, eg. "Carcassonne". I wanted to have single-word titles in BGD, but I didn't want to duplicate real names. So I applied the Queneau assembly algorithm on the word level. Here, the chunk is a run of letters that's all vowels or all consonants. So "Carcassonne" would be split into the chunks ["C", "a", "rc", "a", "ss", "o", "nn", e"]. I keep two sets of buckets, one for vowels and one for consonants. If the first chunk was a vowel chunk, the second chunk is a consonant chunk, and I alternate til I reach the end. This means that single-word BGD titles are almost never English words, but they do capture the feel of those one-word titles that aren't words (examples: "Zajekan", "Fraseda", "Kongin", "Q-blardo").
var makeQueneau = require('quenea-letters') var queneauLetters = makeQueneau() var lines = fs.readFileSync('./lines.txt').toString().split('\n') queneauLetters.seed(lines) queneauLetters.fill(5) => wowwwowowowowowowowowowo // idk this will vary i guess
=> slices up the lines into words into consonant/vowel runs and puts them in the appropriate bucket
=> randomly alternates between vowels and consonants until it has
length number of consonant/vowel runs. note that length here does not mean string.length, i.e,
['w', 'o', 'rld'] would be valid for length 3.