skillfed

pyspellchecker

Pure python spell checker based on work by Peter Norvig

pyspellchecker v0.9.0 2.9M downloads/30d#2,818 on PyPI785
Permissive license MIT Active released

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 pyspellchecker

uv

uv add pyspellchecker

poetry

poetry add pyspellchecker

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Utilities

Tags

spell checker pythontypo detectionword correctionlevenshtein distance spell checkmultilingual spell checkerspelling validationmisspelling detection
nlpmultilingualzero-dependency

More Libraries packages