DamerauLevenshteinDistance
DamerauLevenshteinDistance[u,v]
gives the Damerau–Levenshtein distance between strings, vectors or biomolecular sequences u and v.
Details and Options
- DamerauLevenshteinDistance[u,v] gives the number of one-element deletions, insertions, substitutions, and transpositions required to transform u to v.
- For strings, setting the option IgnoreCase->True makes DamerauLevenshteinDistance treat lowercase and uppercase letters as equivalent.
Examples
open allclose allBasic Examples (3)
Scope (2)
Applications (2)
Properties & Relations (4)
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:
Text
Wolfram Research (2008), DamerauLevenshteinDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/DamerauLevenshteinDistance.html (updated 2020).
CMS
Wolfram Language. 2008. "DamerauLevenshteinDistance." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DamerauLevenshteinDistance.html.
APA
Wolfram Language. (2008). DamerauLevenshteinDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DamerauLevenshteinDistance.html