Liking cljdoc? Tell your friends :D

namejen.markov


add-to-chainclj

(add-to-chain chainlen chainmap chain)
source

build-map-from-seqsclj

(build-map-from-seqs chainlen input-sequences)
source

build-map-from-stringsclj

(build-map-from-strings chainlen strings)
source

generate-sequenceclj

(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.
sourceraw docstring

generate-single-nameclj

(generate-single-name nextmap)

For a sequence of letters, captialize and return as string.

For a sequence of letters, captialize and return as string.
sourceraw docstring

make-nextmapclj

(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]}`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close