--- id: pyxdameraulevenshtein version: "1.10.0" license: BSD 3-Clause License license_treatment: permissive maintenance: active --- # pyxDamerauLevenshtein — pyxDamerauLevenshtein implements the Damerau-Levenshtein (DL) edit distance algorithm for Python in Cython for high performance. License: permissive · Maintenance: active · Downloads: 153.5K/mo ## What it is and what it does pyxDamerauLevenshtein is a Cython-accelerated implementation of the Damerau-Levenshtein edit distance algorithm, which measures the minimum number of single-character edits (insertions, deletions, substitutions, or transpositions of adjacent characters) needed to transform one sequence into another. It runs in O(N*M) time using O(M) space and supports any sequence type including strings, lists, tuples, and ranges, with full Unicode support. The package provides four main functions: raw edit distance between two sequences, normalized distance (ratio scaled to 0.0–1.0), and batch versions that compute distances against multiple sequences at once. All functions accept an optional max_distance threshold that short-circuits computation when the true distance exceeds it, avoiding unnecessary work. It is significantly faster than pure Python implementations and comparable to or faster than other C-based alternatives like jellyfish. Use it for: - Spell-checking and typo correction by computing distance between user input and dictionary words. - Fuzzy string matching in data deduplication and record linkage tasks. - DNA/protein sequence alignment in bioinformatics applications. - Search result ranking by scoring query similarity to indexed documents. - Duplicate detection in user-generated content or database records. - Phonetic matching and name variation handling in identity resolution. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes Damerau-Levenshtein edit distance between sequences using Cython for high performance, supporting strings, lists, tuples, and other sequence types with optional distance thresholds. Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive BSD license, and provides a well-optimized implementation of a standard algorithm with broad applicability. Install friction is low due to prebuilt wheels. Suitable for production use in spell-checking, fuzzy matching, bioinformatics, and data deduplication workflows. ## Install pip install pyxdameraulevenshtein uv add pyxdameraulevenshtein poetry add pyxdameraulevenshtein ## Installing pyxDamerauLevenshtein Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.9–3.14 on macOS, Linux, and Windows, so installation typically requires no build step. Actively maintained with recent releases. License in practice: BSD 3-Clause License is permissive and allows commercial use, modification, and redistribution with attribution required. No restrictions on use in proprietary software. Quickstart: pip install pyxDamerauLevenshtein from pyxdameraulevenshtein import damerau_levenshtein_distance damerau_levenshtein_distance('smtih', 'smith') # returns 1 damerau_levenshtein_distance('smtih', 'smith', max_distance=2) # short-circuits Verify before relying: - Whether the package is actively maintained beyond the last commit date (2026-03-22) and whether future Python versions beyond 3.14 will be supported. ## Package facts - License: BSD 3-Clause License (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 153.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags damerau levenshtein distance, edit distance algorithm, string similarity metric, sequence comparison, fast string matching, unicode edit distance, optimal string alignment, string-matching, sequence-alignment, bioinformatics [View on SkillFed](https://skillfed.io/packages/pyxdameraulevenshtein) · [View on PyPI](https://pypi.org/project/pyxdameraulevenshtein/)