Reputation: 35
I am using pyspellchecker for finding wrong words. It is picking a few words as misspelled. But it suggests the same word as the correction.
Why is it doing so? Am I missing anything?
Example:
from spellchecker import SpellChecker
spell = SpellChecker()
list = ["BERHAMPUR", "berhampur", "SAHEBPARA"]
misspelled = spell.unknown(list)
print(misspelled)
for word in misspelled:
print(spell.correction(word))
It returns as follows:
> {'sahebpara', 'berhampur'}
>
> sahebpara berhampur
Why is misspelled
and the suggested correction for each word the same?
Upvotes: 0
Views: 308