I need a spell checker in python. I've looked at previous answers and they all seem to be outdated now or not applicable:
Python spell checker using a trie This question is more about the data structure.
Python Spell Checker This is a spelling corrector, given two strings.
http://norvig.com/spell-correct.html Often referenced and quite interesting, but also a spelling corrector, and accuracy isn't quite good enough, though I'll probably use this in combination with an checker.
Spell Checker for Python Uses pyenchant which isn't maintained anymore.
Python: check whether a word is spelled correctly Also suggests Pyenchant which isn't maintained.
Some details of what I need:
What's the best approach here? Are there any maintained libraries? Do I need to download a dictionary and check against it?
2 recent Python libraries, both based on Levenshtein minimum edit distance optimized for the task:
It should be mentioned that the symspellpy link above is the Python port of the original SymSpell C# implementation its description is here. The original SymSpell Github repository includes a dictionary with word frequencies.
Spello includes a basic pre-trained model on 30K news and 30K Wikipedia articles. But it's better to train it on your custom corpus from your domain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With