This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

DamerauLevenshteinDistance

DamerauLevenshteinDistance
gives the Damerau-Levenshtein distance between strings or vectors u and v.
  • DamerauLevenshteinDistance gives the number of one-element deletions, insertions, substitutions, and transpositions required to transform u to v.
Damerau-Levenshtein distance between two strings:
Damerau-Levenshtein distance between two vectors:
Damerau-Levenshtein distance between two strings:
In[1]:=
Click for copyable input
Out[1]=
 
Damerau-Levenshtein distance between two vectors:
In[1]:=
Click for copyable input
Out[1]=
Compute distance between strings of unequal length:
Compute distance between vectors of any length:
Obtain Damerau-Levenshtein distance, ignoring case of letters:
Cluster string data using Damerau-Levenshtein distance:
Cluster numeric data using Damerau-Levenshtein distance:
Damerau-Levenshtein distance counts transposition as a single operation:
EditDistance treats transposition as separate deletion and insertion operations:
Cluster string data using Damerau-Levenshtein distance:
Cluster string data using EditDistance:
DamerauLevenshteinDistance is less than or equal to HammingDistance for strings of equal length:
DamerauLevenshteinDistance is less than or equal to HammingDistance for vectors of equal length:
New in 7