From 17eee28a4bf42b01df072daddfefba611eb4171f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 7 Jul 2012 04:32:52 -0400 Subject: [PATCH] Whoops, got the slicing wrong. --- earwigbot/wiki/copyvios/markov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/wiki/copyvios/markov.py b/earwigbot/wiki/copyvios/markov.py index 00567b2..7813f61 100644 --- a/earwigbot/wiki/copyvios/markov.py +++ b/earwigbot/wiki/copyvios/markov.py @@ -40,7 +40,7 @@ class MarkovChain(object): words = ([self.START] * padding) + words + ([self.END] * padding) for i in range(len(words) - self.degree + 1): last = i + self.degree - 1 - self.chain[words[i:last]][last] += 1 + self.chain[words[i:last]][words[last]] += 1 def __repr__(self): """Return the canonical string representation of the MarkovChain."""