Assignment-2
CS671(NLP)
Spell Checker
Note:
a) Unigram frequencies list constructed and non-words given some smoothing
b) Edit1-Distance functioon constructed which adds, deletes, substitutes Hindi Alphabets and checks frequency of Newly Constructed word in corpus to provide top few suggestions which have considerable frequency in corpus.
c) Bulit 2-gram model and provided suggestions for non-word errors by looking at bigrams constructed
d) Installed aspell along with its python library
e) Aspell generates a lot of suggestions on a single line, so it is not possible to list each and every suggestion and alos report the accuracy. In some case, aspell generates suggestions for है but my code doesn't do so which is much better response from my code
Precision-26.98
Recall-36.95
F-Score-31.19
f) Used hi_phonet.dat to replace phonetically similar words and and checked the new word in corpus to provide suggestions
Few Examples:
Unigram:एनैमल
Suggestions:एनिमल, एनीमल ,एनामल
Bigram:में खाँचेदार
Suggestions:में खांचेदार
Bigram:की ओरवाली
Suggestions:की घरवाली
Phonetics:संबन्धियों
Suggestions:सम्बन्धियों
Phonetics:आदरनीय
Suggestions:आदरणीय
Code:
Download