Levenshtein Distance
Minimum number of single-character insertions, deletions or substitutions needed to turn one string into another.
Description
Minimum number of single-character insertions, deletions or substitutions needed to turn one string into another.
Levenshtein Distance is a focused tool for the following task. Minimum number of single-character insertions, deletions or substitutions needed to turn one string into another. It reports distance from the values you provide rather than inventing measurements, coefficients, or professional judgment that are not part of the input.
When to use Levenshtein Distance
Use this calculation to reproduce a defined quantitative method when the observations, units, sampling process, and assumptions match the method shown here.
- First string
- Required string. Source string, compared by Unicode code points.
- Second string
- Required string. Target string, compared by Unicode code points.
The cited overview of Edit distance supplies background for the terminology and domain context used by this tool.1
How Levenshtein Distance works
Minimum number of single-character insertions, deletions or substitutions needed to turn one string into another. Inputs are interpreted exactly in the displayed units and the calculation returns the following fields without presentation rounding.
- distance
- Returned integer. Edit distance between a and b.
Limitations and assumptions
- A numerical result does not by itself establish data quality, causation, representativeness, independence, distributional fit, or practical significance.
- Use finite inputs in the displayed units, preserve source measurements and assumptions, and independently verify consequential decisions.
Alternative or Complementary approaches
Inspect the underlying data, visualize its distribution, report uncertainty and sample size, and compare the result with a robust or domain-specific method where appropriate.
References
-
Edit distance — Wikipedia contributors
Similar or alternative tools
- Damerau–Levenshtein Distance Calculator
Calculate the Damerau-Levenshtein edit distance between two strings, counting insertions, deletions, substitutions and adjacent transpositions (optimal string alignment variant).
- Hamming Distance Calculator
Count differing Unicode code-point positions in equal-length strings.
- Mahalanobis Distance Calculator
Calculate Mahalanobis distance using a symmetric positive-definite covariance matrix.