Levenshtein Distance
Minimum number of single-character insertions, deletions or substitutions needed to turn one string into another.
Description
Measure the minimum insertions, deletions, and substitutions required to change one string into another.
Levenshtein Distance Calculator measure the minimum insertions, deletions, and substitutions required to change one string into another.
Use this for spelling distance, fuzzy search diagnostics, deduplication features, and test assertions where an absolute edit count is useful.
When to use Levenshtein Distance Calculator
Use this for spelling distance, fuzzy search diagnostics, deduplication features, and test assertions where an absolute edit count is useful.
How it works
A dynamic-programming row tracks the least cost for every pair of prefixes. Each insertion, deletion, or substitution costs one; matching code points cost zero.1
Interpreting the result
Keep the input units, direction conventions, encoding, and ordering rules visible when reusing the result. Preserve the full returned value for downstream calculations and round only for presentation.
Assumptions and limitations
The score is unnormalized, so longer strings can have larger values. Case, whitespace, punctuation, accents, and Unicode normalization are significant unless handled beforehand.
References
-
Binary codes capable of correcting deletions, insertions, and reversals — Soviet Physics Doklady