--- id: strsimpy version: "0.2.1" license: MIT License license_treatment: permissive maintenance: abandoned --- # strsimpy — A library implementing different string similarity and distance measures License: permissive · Maintenance: abandoned · Downloads: 513.3K/mo ## What it is and what it does strsimpy is a Python port of a Java string-similarity library that provides implementations of multiple string comparison algorithms. It lets you measure how similar or different two strings are using different mathematical approaches—some compute edit distance (how many character changes are needed), others use n-gram profiles or set-based metrics. Each algorithm has different trade-offs: some are normalized to 0–1 ranges, some satisfy the triangle inequality property useful for indexing, and some are optimized for specific tasks like typo correction or diff utilities. You import an algorithm class, instantiate it, and call its similarity() or distance() method on two strings. The library includes Levenshtein variants (standard, normalized, weighted, Damerau), Jaro-Winkler, Longest Common Subsequence, n-gram based methods (Q-Gram, cosine, Jaccard, Sorensen-Dice, overlap), and experimental SIFT4. It has no external dependencies and installs as a pure Python wheel. Use it for: - Detect typos and suggest corrections by finding the most similar string from a dictionary using Jaro-Winkler - Implement a fuzzy search feature that matches user input against product names or database records despite spelling variations - Compare file contents or code diffs by computing Longest Common Subsequence distance - Build a deduplication system that identifies near-duplicate records in a dataset using normalized Levenshtein - Analyze OCR output by using weighted Levenshtein to account for character-specific error costs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements a dozen string similarity and distance algorithms including Levenshtein, Jaro-Winkler, Longest Common Subsequence, and cosine similarity for comparing text strings. Yes, if you need string similarity algorithms and can accept an abandoned package. The library is stable, has no known vulnerabilities, low install friction, and covers a comprehensive range of algorithms. However, do not install if you require active maintenance, bug fixes, or support for Python versions beyond 3.9—the last release was 2021-09-10 with no commits since November 2022. ## Install pip install strsimpy uv add strsimpy poetry add strsimpy ## Installing strsimpy Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2021-09-10 and last commit 2022-11-12—so no active maintenance or bug fixes should be expected. License in practice: MIT License permits commercial and private use with minimal restrictions, requiring only license and copyright notice retention. Quickstart: pip install strsimpy from strsimpy.jaro_winkler import JaroWinkler jw = JaroWinkler() similarity = jw.similarity('string1', 'string2') Verify before relying: - Whether the package works reliably with Python versions beyond 3.9 despite classifiers only listing up to 3.9 - Performance characteristics on very long strings or large-scale batch comparisons - Whether all dozen algorithms mentioned in the description are fully implemented and documented ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 513.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags string similarity distance, levenshtein distance, jaro-winkler similarity, text comparison algorithms, string matching, edit distance, fuzzy string matching, string-algorithms, text-analysis [View on SkillFed](https://skillfed.io/packages/strsimpy) · [View on PyPI](https://pypi.org/project/strsimpy/)