You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,34 @@ This algorithm is usually used for optical character recognition (OCR) applicati
141
141
142
142
It can also be used for keyboard typing auto-correction. Here the cost of substituting E and R is lower for example because these are located next to each other on an AZERTY or QWERTY keyboard. Hence the probability that the user mistyped the characters is higher.
// The cost for substituting 't' and 'r' is considered smaller as these 2 are located next to each other on a keyboard
165
+
if (c1=='t'&&c2=='r') return0.5;
166
+
167
+
// For most cases, the cost of substituting 2 characters is 1.0
168
+
return1.0;
169
+
}
170
+
}
171
+
```
145
172
146
173
## Damerau-Levenshtein
147
174
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**.
<Description>A .NET port of java-string-similarity.</Description>
11
12
<Summary>A .NET port of java-string-similarity (https://github.com/tdebatty/java-string-similarity). A library implementing different string similarity and distance measures. Several algorithms (including Levenshtein edit distance and sibblings, Jaro-Winkler, Longest Common Subsequence, cosine similarity etc.) are currently implemented.</Summary>
0 commit comments