Knowledge Base
Levenshtein Distance

Levenshtein Distance

The string column comparisons are made using the Levenshtein distance (opens in a new tab) algorithm. Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other.

For example, the Levenshtein distance between "kitten" and "sitting" is 3, since the following three edits change one into the other, and there is no way to do it with fewer than three edits.

  1. kitten → sitten (substitution of "s" for "k")
  2. sitten → sittin (substitution of "i" for "e")
  3. sittin → sitting (insertion of "g" at the end)

Consider the following tables:

IDAnother IDYet Another IDNameAge
1101201Jhn20
2102202Mry21
2103203Jne22
3103203Jck23
3104205Jll24

Expected Frame

IDAnother IDYet Another IDNameAge
1101201John28
2102202Mary31
2103203Jane32
3103203Jack33
3104205Jill34

You can immediately identify that the Name column in the Tested frame has one character missing at the 2nd index in each row. So the Levenshtein distance between Jhn and John is 1 and so on. The total sum of all the Levenshtein distances is 5. In the comparion report, the total of all the Levenshtein distances is reported. The comparison fails if the total is greater than zero.