further pepping, spelling and other such things

This commit is contained in:
Luke Rogers 2014-02-13 15:02:44 +13:00
parent 6cc7554cd8
commit cd5ae1d32b
12 changed files with 52 additions and 56 deletions

View file

@ -15,11 +15,11 @@ def spell(inp):
if len(inp.split(" ")) > 1:
# input is a sentence
chkr = SpellChecker(locale)
chkr.set_text(inp)
checker = SpellChecker(locale)
checker.set_text(inp)
offset = 0
for err in chkr:
for err in checker:
# find the location of the incorrect word
start = err.wordpos + offset
finish = start + len(err.word)