Unigram Model
In this part of the assignment i modeled the language using unigrams.In case of non words errors, i created a possible candidates set for the correct words on the basis of ideas of norwig.The strings were those which are 1 and 2 edit distance away from it .The ranking of suggestions were then done according to their occurence probability
Bigram model
In this part i modeled the language using bigrams.The approach was to find the nonword in the sentence and for that word create the possible corrected words using earlier edit distance metric.Then search all the possible bigrams in the corpus and replace with that word whose bigram frequency is high. python code for bigram based spell checker
Aspell Results for the test file is
aspell output
usage :cat file.txt | aspell --lang=hi pipe --encoding utf-8
Phonetic distance based Spell checking
The spell checker could be made more smart by adding strings which are phoneticaly nearer to error word. Similiar soundsNorwig's code for english was modifed for hindi and also comparing with ground truth is included