text-matcher tmp.txt tmp.txt
raises IndexError. Sample stack trace:
.../text_matcher/matcher.py in extend_matches(self, cutoff)
267 # If we've gone through the whole list and there's nothing
268 # left to extend, then stop. Otherwise do this again.
--> 269 self.extend_matches()
270
271 return self.healed_matches
.../text_matcher/matcher.py in extend_matches(self, cutoff)
267 # If we've gone through the whole list and there's nothing
268 # left to extend, then stop. Otherwise do this again.
--> 269 self.extend_matches()
270
271 return self.healed_matches
.../text_matcher/matcher.py in extend_matches(self, cutoff)
237 for match in self.healed_matches:
238 # Look one word before.
--> 239 wordA = self.textAgrams[(match.a - 1)][0]
240 wordB = self.textBgrams[(match.b - 1)][0]
241 if self.edit_ratio(wordA, wordB) < cutoff:
IndexError: list index out of range
Running command like:
raises IndexError. Sample stack trace:
Error is possibly because of this: https://github.com/JonathanReeve/text-matcher/blob/master/text_matcher/matcher.py#L239 where
match.ais 0 and the evaluated command becomes:wordA = self.textAgrams[-1][0]and thus causing an infinite loop.