- All Implemented Interfaces:
- MetricStringDistance, StringDistance, Serializable
public class Damerau
extends Object
implements StringDistance, MetricStringDistance
Implementation of Damerau-Levenshtein distance with transposition (also
sometimes calls unrestricted Damerau-Levenshtein distance).
It is the minimum number of operations needed to transform one string into
the other, where an operation is defined as an insertion, deletion, or
substitution of a single character, or a transposition of two adjacent
characters.
It does respect triangle inequality, and is thus a metric distance.
This is not to be confused with the optimal string alignment distance, which
is an extension where no substring can be edited more than once.
- Author:
- Thibault Debatty
- See Also:
- Serialized Form