* The python scripts getGram2.py, getGram3.py, getWords.py are used to obtain the unigrams, bigrams, trigrams given the sentences in a corpus. I have not attached the vocabulary data due to its huge size.

* segment.py is the same code used in part A of HW2

* spellCheck.py is used to obtain the correct spelling of an incorrect word

* result.py calls the functions in spellCheck.py and print top 3 suggestions of an incorrect word. It takes as input a list of incorrect words. result_sent.py does the same thing but it is used to detect errors in a sentence (real word + non word). It takes as input a list of sentences.

* test.txt and text2.txt are the two files which consists of incorrect words. On test.txt I got an accuracy of 81% and on test2.txt I got an accuracy of 85%

* test3.txt is a list of sentences that contain real word errors. For this test case, I got an accuracy of 33%; detecting real word errors are difficult as they largely depend on the context and the corpus does not have a good collection of lexicons.

* aspell_check.py is used to find accuracy of the spellings generated by aspell.
Aspell command - 
cat test_aspell2.txt | aspell -a --lang=hi --sug-mode=bad-spellers --encoding=utf-8 > test_result2.txt
