News for hackers. Stuff that matters.
Re:Romance.js – Programmable Valentine's Day Poetry by fogleman on Friday February 14, 2014 @03:40PM (#7240861)
You should use more context than one previous word. You should use N previous words and you'll get more realistic results.

I wrote a word game using markov chains to generate fake (but real looking) words.

http://www.michaelfogleman.com/wug/

Read about the algorithm here:

http://www.michaelfogleman.com/wug/algorithm

Also, you can leave punctuation in - you'd just need a larger training set, probably.

There are no comments on this comment yet.