mammothb/symspellpy
Python port of SymSpell: 1 million times faster spelling correction & fuzzy search through Symmetric Delete spelling correction algorithm
What it is
symspellpy is a Python port of the SymSpell project (version 6.7.2). The README states that SymSpell itself provides “much higher speed and lower memory consumption” compared to alternatives, though it doesn’t specify what the algorithm actually does. The port reimplements SymSpell in Python and includes unit tests copied from the original project to make sure the behavior matches the reference implementation exactly.
Performance caveat
The README explicitly notes that the port has not been optimized for speed — meaning the Python version isn’t tuned for performance the way the original might be. However, starting in version 6.7.2, the project added a “fast distance comparer” built on the editdistpy library (a separate project by the same author). For typical usage under default settings, this change gives roughly a 2× speedup compared to the previous approach. The benchmark results are available in the project’s tests/benchmarks.ipynb notebook.
Key details
- Accuracy guarantee: Unit tests from the original SymSpell project were ported over and are used to verify the correctness of the Python version.
- Documentation & install: Installation instructions live in the
INSTALL.rstfile or in the online docs; usage examples are also provided in the documentation. - Notable change in v6.7.2: switched the distance-computation module to
editdistpy, enabling the speed improvement mentioned above.
What it doesn’t tell you
The README never states what SymSpell actually does (e.g., spelling correction, fuzzy search, etc.). It only describes the port and its engineering details, so this explainer sticks to what’s explicitly documented.
Related
- Project
- Project
- Project
- Project