Skip to content

Commit 6a9778e

Browse files
committed
Corrected README for Damerau distance
1 parent 3706d22 commit 6a9778e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ public class MyApp {
142142
```
143143

144144
## Damerau-Levenshtein
145-
Similar to Levenshtein, Damerau-Levenshtein distance 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**.
145+
Similar to Levenshtein, Damerau-Levenshtein distance with transposition (also sometimes calls unrestricted Damerau-Levenshtein distance) 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**.
146146

147-
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.
147+
It does respect triangle inequality, and is thus a metric distance.
148148

149-
Also, Damerau-Levenshting does not respect triangle inequality, and is thus not a metric distance.
149+
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.
150150

151151
```java
152152
import info.debatty.java.stringsimilarity.*;

0 commit comments

Comments
 (0)