[Haskell-cafe] Markov Text Generator & Randomness
ben at smart-cactus.org
Thu Jul 24 02:39:56 UTC 2014
Charles-Pierre Astolfi <cpa at crans.org> writes:
> Hi -cafe,
> I'm coding a Markov Text Generator (of order 1). Basically, you have a
> source text, and knowing the frequencies of pairs of consecutive
> words, you generate a somewhat syntactically correct text from this.
> Here's the link to my code and to a source text you can use as example.
> The kickers is that this code generates sentences with consecutive
> words that never appears next to each other in the source text.
> For example, the code generated "They sat over at because old those
> the lighted.", but "over at" never occurs in the source text, so it
> shouldn't occur in a generated sentence.
You mean like,
"The old man looked from his glass across the square, then over at the waiters."
Otherwise my cursory look turned up no bugs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 472 bytes
Desc: not available
More information about the Haskell-Cafe