# life4/textdistance

📐 Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.

Repository: https://github.com/life4/textdistance
Canonical: https://ross.abutalabs.com/products/textdistance
Language: Python
License: MIT
License Family: permissive
Topics: distance, algorithm, python, textdistance, hamming-distance, levenshtein-distance, damerau-levenshtein, damerau-levenshtein-distance, algorithms, distance-calculation, jellyfish, diff, levenshtein
Last push: 2025-04-18T12:13:17+00:00

## Health v2 (maintenance only)
Score: 30/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 17, release rhythm 8, longevity 100
- inputs: {"age_days": 3407, "days_push": 502, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3540, forks 261 (observed 2026-08-28T04:08:09.190515+00:00)

## What it is
A Python library for computing distances and similarities between two or more sequences using 30+ algorithms such as Levenshtein, Hamming, and Jaccard. It offers a pure Python implementation with a common interface and optional external libraries or NumPy for speed.

## Use cases
- compare similarity between two strings
- compute levenshtein distance in python
- fuzzy match text records
- deduplicate similar names in a dataset
- measure sequence distance for record linkage
- find closest matching string to a query

## When to choose
- you need many string distance algorithms behind one consistent API
- you want a pure Python fallback with optional accelerated backends
- you need to compare more than two sequences at once

## When to avoid
- you need maximum raw performance for a single algorithm - a dedicated C implementation like python-Levenshtein is faster
- you need non-text sequence distances outside its supported algorithm set

## Facets
- artifact type: library
- maturity: active
- function: nlp, parser, math
- domain: developer-tools
- platform: python, cross-platform
- tags: string-similarity, levenshtein, sequence-comparison, fuzzy-matching, text-analysis, natural-language-processing, algorithms

## Member repositories
- life4/textdistance (main) score 30

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.190515+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:34:36.068445+00:00, confidence not recorded.
  - readme: https://github.com/life4/textdistance (fetched 2026-08-28T04:08:09.190515+00:00, sha d301455c3186)
- Data as of 2026-08-30T08:39:29.467469+00:00.
