--- id: pyspellchecker version: "0.9.0" license: MIT license_treatment: permissive maintenance: active --- # pyspellchecker — Pure python spell checker based on work by Peter Norvig License: permissive · Maintenance: active · Downloads: 2.9M/mo ## 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 above — 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 pip install pyspellchecker uv add pyspellchecker 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_current - Install friction: low - Maintenance: active - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags spell checker python, typo detection, word correction, levenshtein distance spell check, multilingual spell checker, spelling validation, misspelling detection, nlp, multilingual, zero-dependency [View on SkillFed](https://skillfed.io/packages/pyspellchecker) · [View on PyPI](https://pypi.org/project/pyspellchecker/)