Use the Edit Distance algorithm to compare words or short text strings, such as names.
The Edit Distance algorithm calculates the minimum “cost” of transforming one string to another by inserting, deleting, or replacing characters.
Edit Distance Example
Consider the following strings:
Levenston
Levens
h
t
ei
n
The highlighted characters indicate the operations required to transform one string into the other.
The Edit Distance algorithm divides the number of unchanged characters (8) by the length of the longest string (11). In this example, the strings are 72.7% similar and the match score is