Commit Graph

11 Commits

Author SHA1 Message Date
Brian S. Stephan 28f450ab5d Markov: improve min_size by implementing min_search_tries
if the end of a chain has been reached via __end, but min_size
has not been satisfied, discard the last couple elements in the
chain and try again. use min_search_tries so we don't do this
forever.
2011-01-25 20:42:52 -06:00
Brian S. Stephan 7b4b86dc0d Markov: add support for requesting desired min/max size of a reply
note that since the min_size support is kind of crude at the moment,
this only partially works
2011-01-25 20:25:15 -06:00
Brian S. Stephan c732466129 Merge branch 'master' of git.incorporeal.org:dr.botzo 2011-01-24 16:51:52 -06:00
Brian S. Stephan 2f3feb093d have !markov learn echo the text it learned, in case someone wants to chain it with other commands for some reason 2011-01-24 16:51:05 -06:00
Brian S. Stephan 18fc614a4a assorted whitespace nitpicking 2011-01-20 14:15:10 -06:00
Brian S. Stephan 7c05f60ffd Markov: implement a min_size, which tries to make a chain of at least min_size words.
note that this isn't guaranteed, if the chain is such that the
current tuple has nowhere to go but to the end of the line, then
it will follow it --- it doesn't try to go back and rebuilt a different
chain or anything.
2011-01-19 18:44:07 -06:00
Brian S. Stephan ac0429569e Markov: size -> max_size, since I'm going to try adding a min_size soon 2011-01-19 18:35:01 -06:00
Brian S. Stephan 176ca25c68 Markov: increase the default max length from 25 words to 100 words.
it's expected that, usually, the chain will have hit an end before this.
2011-01-19 18:32:15 -06:00
Brian S. Stephan d592d3f3bb Markov: regexes should only match start of line --- add ^ 2011-01-19 10:20:20 -06:00
Brian S. Stephan 3283fac1ff Markov: remove some debugging i forgot to clean out before the initial commit 2011-01-18 22:51:40 -06:00
Brian S. Stephan 8dd223f778 Markov: a module to implement a chatterbot via markov chains.
yeah, we have MegaHAL, but i can't find a good implementation in
python that actually works and is stable, so we'll implement a
simple thing ourselves. works pretty much like MegaHAL does, but
without the string corruption.

original code provided by ape, care of mike bloy
2011-01-18 22:30:59 -06:00