3 # Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
4 # New markov chain plugin tester
8 mkv = MarkovChainer.new
10 text = "This is a test, a nice little test indeed."
14 words = text.scan(MarkovChainer::WNW)
17 word = words.pick_some(MarkovChainer::MAX_ORDER).join
19 puts "Word: %s, next: %s" % [word.inspect, mkv.next(word).to_s.inspect]