Skip to content

Instantly share code, notes, and snippets.

View siofongwong's full-sized avatar

Pierre Wong siofongwong

View GitHub Profile
import os.path
import collections
from operator import itemgetter
WORDFILE = '/usr/share/dict/words'
class Autocorrect(object):
"""
Very simplistic implementation of autocorrect using ngrams.
"""