barrust / pyspellchecker

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

Incomplete words #150

Closed stephenomalley closed 9 months ago

stephenomalley commented 1 year ago

I'm not sure if I'm using the package correctly or not. I'd been using the package up to 0.5.5 and I've went to upgrade to the latest version and my tests failed as a result of it. It seems in 0.5.6 there was a dictionary upgrade which included some words that I was trying to catch.

My sentence was: "I will write a story without a spelling mista and hopefully you will pride me on habing no mistak."

In 0.5.5 the result of spellchecker.unknown( ['I', 'will', 'write', 'a', 'story', 'without', 'a', 'spelling', 'mista', 'and', 'hopefully', 'you', 'will', 'pride', 'me', 'on', 'habing', 'no', 'mistak'] is {'habing', 'mista', 'mistak'}

in 0.5.6 and above the output is {'habing'}.

What I'm not sure about is if this type of thing is on purpose in order to not categorise partial words as mistakes?