(generate-sequence nextmap)
Generate a sequence using Markov chain by following choices captured in 'nextmap'. Start with an initial sequence/key randomly chosen from the keys in the map. Select next letter randomly based on the available ones for that key. Collect all letters this way, adding them and changing the current key until STOP-STATE symbol is reached.
Generate a sequence using Markov chain by following choices captured in 'nextmap'. Start with an initial sequence/key randomly chosen from the keys in the map. Select next letter randomly based on the available ones for that key. Collect all letters this way, adding them and changing the current key until STOP-STATE symbol is reached.
(generate-single-name nextmap)
For a sequence of letters, captialize and return as string.
For a sequence of letters, captialize and return as string.
(make-nextmap chainlen parts)
Make a map of next values in a Markov chain, given a vector of
input sequences with length == chainlen+1, where the first
chainlen
values of each are the keys, and the values are a vector
of the last letter seen following that sequence. For example,
((a l f r) (a l f i)) --> {(a l f) [r i]}
Make a map of next values in a Markov chain, given a vector of input sequences with length == chainlen+1, where the first `chainlen` values of each are the keys, and the values are a vector of the last letter seen following that sequence. For example, `((a l f r) (a l f i)) --> {(a l f) [r i]}`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close