barrust / pyspellchecker

Pure Python Spell Checking http://pyspellchecker.readthedocs.io/en/latest/
MIT License
691 stars 101 forks source link

Example of wrong spell-correction #164

Closed antongigele closed 6 months ago

antongigele commented 6 months ago

The code returns a false positive for the word "familly", though it should return "family". I guess that familly has been denoted a existing word somehow by mistake, there might be other words also. Here is the code to see the result

from spellchecker import SpellChecker
spell = SpellChecker()

word = "familly"
print(spell.correction(word))

>>> familly
barrust commented 6 months ago

Yes, you are correct. The data source (opensubtitles) for the word frequency list contains many mistakes and I am trying to find a good solution to correct these issues.