pyspellchecker
Pure python spell checker based on work by Peter Norvig
What it is and what it does
pyspellchecker is a pure Python spell checker that identifies misspelled words and suggests corrections by comparing them against word frequency lists using Levenshtein distance. It implements Peter Norvig's spell-checking algorithm, finding candidate corrections within an edit distance of up to 2 from the original word, then ranks them by frequency. The package includes built-in dictionaries for multiple languages: English, Spanish, French, Portuguese, German, Italian, Russian, Arabic, Basque, Latvian, Dutch, and Persian.
The library is designed for straightforward integration into Python applications. It allows you to check words against known dictionaries, get the most likely correction for a misspelled word, retrieve a set of candidate corrections, and customize the word frequency list by loading additional text or word lists. For longer words, the distance parameter can be reduced from the default 2 to 1 to improve performance and reduce false positives.
Use it for:
- Validate user input in web forms or text editors to flag potential typos.
- Build a spell-checking layer into a document processing or content management system.
- Preprocess text data for NLP pipelines by identifying and correcting spelling errors.
- Create a multilingual spell checker for applications serving non-English users.
- Augment domain-specific applications with custom word lists for technical or specialized terminology.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects misspelled words and suggests corrections using Levenshtein distance matching against word frequency lists, with built-in support for multiple languages.
Yes. The package is actively maintained, has no external dependencies, supports modern Python versions, carries no known vulnerabilities, and uses a permissive MIT license. It is well-suited for projects needing basic to intermediate spell-checking functionality across multiple languages. Install it if you need straightforward spell detection and correction without heavy dependencies.
Install
pyspellchecker on PyPI
pip
pip install pyspellcheckeruv
uv add pyspellcheckerpoetry
poetry add pyspellcheckerInstalling pyspellchecker
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and stable release history.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install pyspellchecker
from pyspellchecker import SpellChecker
spell = SpellChecker()
misspelled = spell.unknown(['something', 'is', 'hapenning', 'here'])
for word in misspelled:
print(spell.correction(word))
Requires Python 3.10 or later.
Verify before relying
- Performance characteristics on very large word lists or documents.
- Accuracy of corrections across different language dictionaries.
- How well the distance parameter tuning affects real-world spell-checking quality.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 160 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,939,618/month — #2,818 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyspellchecker-0.9.0-py3-none-any.whl
Keywords: python, spelling, natural language processing, nlp, typo, checker
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pyspellingPySpelling wraps Aspell or Hunspell to automate…
permissive · top 15,000 on PyPI
symspellpysymspellpy is a Python port of SymSpell v6.7.2…
permissive · top 15,000 on PyPI
pyenchantPyEnchant provides Python bindings to the…
copyleft · top 5,000 on PyPI
typosFinds and corrects spelling mistakes in source…
permissive · top 5,000 on PyPI
codespellCodespell finds and fixes common misspellings…
copyleft · top 5,000 on PyPI
language_tool_pythonPython wrapper for LanguageTool that checks…
copyleft · top 15,000 on PyPI
snowballstemmerProvides stemming algorithms for 34 languages,…
permissive · top 1,000 on PyPI
wordfreqwordfreq looks up word frequencies across over…
permissive · top 5,000 on PyPI
strsimpyImplements a dozen string similarity and…
permissive · top 15,000 on PyPI
PyStemmerPyStemmer provides word stemming algorithms for…
permissive · top 5,000 on PyPI