Description
Autocorrect is a spelling corrector library for Python. It corrects full sentences or single words and supports English, Polish, Turkish, Russian, Ukrainian, Czech, Portuguese, Greek, Italian, Vietnamese, French and Spanish. It is based on a phatpiglet autocorrect project and on Peter Norvig's spelling corrector, and it ranks candidate corrections by how often each word occurs, so a higher frequency means a more likely correction. You can ask for several candidates for one word. Correction can take around 200 ms on some words, so there is a fast option that returns in microseconds but does not fix words with two typos. For cleaning up text from OCR, where most errors are character replacements, an option limits correction to replacements. You can also pass your own word frequency dictionary, or change the default word set after creating the speller. Adding a language is possible using word frequency data from the wordfreq package or from Wikipedia text, though the author says they will no longer accept pull requests that add languages from Wikipedia. The project is public on GitHub.…
Highlights
- Corrects sentences and single words
- Supports 12 languages
- Fast mode for chatbot-style latency
- OCR mode that corrects replacement errors
- Custom word frequency dictionaries
Ratings & Reviews
No ratings yet
Be the first to rate Autocorrect.
People also visit
Autocorrect FAQ
What is autocorrect?
A spelling corrector library for Python that corrects sentences or words.
Which languages are supported?
English, Polish, Turkish, Russian, Ukrainian, Czech, Portuguese, Greek, Italian, Vietnamese, French and Spanish.
Is there a faster option?
Yes. The fast option returns in microseconds, but words with double typos are not corrected.
Can I use my own vocabulary?
Yes. Pass an nlp_data argument with a dictionary that maps words to their average frequencies.
Can I add a new language?
The README suggests word frequency data from the wordfreq package, plus an alphabet in constants.py. It also notes the author will no longer accept pull requests that add languages from Wikipedia text.
What are the best Autocorrect alternatives?
Popular alternatives to Autocorrect include Grammar Checker, LanguageTool Plus and Grammarly AI. See all Autocorrect alternatives






