Two pragrams are written for project 1 of Knowledge Technologies:
1. nh_spellcheck.py (Spellcheck using NeighbourHood search)
2. trie_spellcheck.py (Spellcheck using trie data structure)
These programs take two arguments: the file to be spellchecked and the dictionary file.
Example:
If the file to be checked is "enron-skilling.txt" and the dictionary is "words.txt",
then you can run the first program as:
$ python nh_spellcheck.py eron-skilling.txt words.txt
Similarly, you can run the second program as:
$ python trie_spellcheck.py eron-skilling.txt words.txt
Remember to put the files in the same directory where the python code is, otherwise you'd need to provide the full path to the files.
*** Note ***
The nh_spellcheck.py takes forever to spellcheck the entire enron-skilling.txt.
I ran it for six hours and it still didn't finish. So I cut the first 1000 lines
of enron-skilling.txt and named it enron-skilling-part.txt. It took about 15 minutes
to spellcheck enron-skilling-part.txt.

Unlimited private and public hosted repositories. Free for small teams!