Skip to content

Commit 8e80da4

Browse files
committed
Final (hopefully) README edit
1 parent ac3b8ed commit 8e80da4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Will produce:
212212

213213
## Optimal String Alignment
214214
The Optimal String Alignment variant of Damerau–Levenshtein (sometimes called the restricted edit distance) computes the number of edit operations needed to make the strings equal under the condition that **no substring is edited more than once**, whereas the true Damerau–Levenshtein presents no such restriction.
215+
The difference from the algorithm for Levenshtein distance is the addition of one recurrence for the transposition operations.
215216

216217
Note that for the optimal string alignment distance, the triangle inequality does not hold and so it is not a true metric.
217218

@@ -222,9 +223,9 @@ public class MyApp {
222223

223224

224225
public static void main(String[] args) {
225-
OptimalStringAlignment d = new OptimalStringAlignment();
226+
OptimalStringAlignment osa = new OptimalStringAlignment();
226227

227-
System.out.println(osa.distance("CA", "ABC"));;
228+
System.out.println(osa.distance("CA", "ABC"));;
228229
}
229230
}
230231
```

0 commit comments

Comments
 (0)