Levenshtein distance and fuzzy matching#

scikitplot.levenshtein provides one small, stable facade for exact unit-cost Levenshtein edit distance, normalized similarity, deterministic ranking and optional Corpus retrieval.

The base behavior never depends on a third-party package. Optional accelerators are discovered lazily.

Start here

Distance, normalized similarity and the first ranked match.

Getting started
How it works

Metric semantics, fallback boundaries and provenance.

How it works
Backends

Internal, RapidFuzz, explicit GPL backend and pure Python.

Backends and fallback
Ranking

Stable ties, limit, key and score_cutoff.

Ranking and matching
Corpus integration

Use normalized edit similarity as a retrieval scorer.

Corpus integration
Performance and limits

Complexity, streaming choices and what cutoff does today.

Performance and limits

Scope#

The facade intentionally does not try to expose every feature from RapidFuzz or the external Levenshtein project. It keeps one portable metric contract and lets optional implementations accelerate it.

For transpositions, weighted operations, edit scripts, median strings or a broader fuzzy-matching toolbox, use a specialized library directly.

Examples#

See Levenshtein for executable, network-free examples.