Skip to content

Commit a5d8421

Browse files
committed
Fix issue #41 : typical usage column
1 parent 961ebaf commit a5d8421

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ Or check the [releases](https://github.com/tdebatty/java-string-similarity/relea
4343

4444
The main characteristics of each implemented algorithm are presented below. The "cost" column gives an estimation of the computational cost to compute the similarity between two strings of length m and n respectively.
4545

46-
| | | Normalized? | Metric? | Type | Cost |
47-
|-------- |------- |------------- |---------- | ------ | ---- |
48-
| [Levenshtein](#levenshtein) |distance | No | Yes | | O(m*n) <sup>1</sup> |
49-
| [Normalized Levenshtein](#normalized-levenshtein) |distance<br>similarity | Yes | No | | O(m*n) <sup>1</sup> |
50-
| [Weighted Levenshtein](#weighted-levenshtein) |distance | No | No | | O(m*n) <sup>1</sup> |
51-
| [Damerau-Levenshtein](#damerau-levenshtein) <sup>3</sup> |distance | No | Yes | | O(m*n) <sup>1</sup> |
52-
| [Optimal String Alignment](#optimal-string-alignment) <sup>3</sup> |distance | No | No | | O(m*n) <sup>1</sup> |
53-
| [Jaro-Winkler](#jaro-winkler) |similarity<br>distance | Yes | No | | O(m*n) |
54-
| [Longest Common Subsequence](#longest-common-subsequence) |distance | No | No | | O(m*n) <sup>1,2</sup> |
55-
| [Metric Longest Common Subsequence](#metric-longest-common-subsequence) |distance | Yes | Yes | | O(m*n) <sup>1,2</sup> |
56-
| [N-Gram](#n-gram) |distance | Yes | No | | O(m*n) |
57-
| [Q-Gram](#q-gram) |distance | No | No | Profile | O(m+n) |
58-
| [Cosine similarity](#cosine-similarity) |similarity<br>distance | Yes | No | Profile | O(m+n) |
59-
| [Jaccard index](#jaccard-index) |similarity<br>distance | Yes | Yes | Set | O(m+n) |
60-
| [Sorensen-Dice coefficient](#sorensen-dice-coefficient) |similarity<br>distance | Yes | No | Set | O(m+n) |
46+
| | | Normalized? | Metric? | Type | Cost | Typical usage |
47+
| -------- |------- |------------- |-------- | ------ | ---- | --- |
48+
| [Levenshtein](#levenshtein) |distance | No | Yes | | O(m*n) <sup>1</sup> | |
49+
| [Normalized Levenshtein](#normalized-levenshtein) |distance<br>similarity | Yes | No | | O(m*n) <sup>1</sup> | |
50+
| [Weighted Levenshtein](#weighted-levenshtein) |distance | No | No | | O(m*n) <sup>1</sup> | OCR |
51+
| [Damerau-Levenshtein](#damerau-levenshtein) <sup>3</sup> |distance | No | Yes | | O(m*n) <sup>1</sup> | |
52+
| [Optimal String Alignment](#optimal-string-alignment) <sup>3</sup> |distance | No | No | | O(m*n) <sup>1</sup> | |
53+
| [Jaro-Winkler](#jaro-winkler) |similarity<br>distance | Yes | No | | O(m*n) | typo correction |
54+
| [Longest Common Subsequence](#longest-common-subsequence) |distance | No | No | | O(m*n) <sup>1,2</sup> | diff utility, GIT reconciliation |
55+
| [Metric Longest Common Subsequence](#metric-longest-common-subsequence) |distance | Yes | Yes | | O(m*n) <sup>1,2</sup> | |
56+
| [N-Gram](#n-gram) |distance | Yes | No | | O(m*n) | |
57+
| [Q-Gram](#q-gram) |distance | No | No | Profile | O(m+n) | |
58+
| [Cosine similarity](#cosine-similarity) |similarity<br>distance | Yes | No | Profile | O(m+n) | |
59+
| [Jaccard index](#jaccard-index) |similarity<br>distance | Yes | Yes | Set | O(m+n) | |
60+
| [Sorensen-Dice coefficient](#sorensen-dice-coefficient) |similarity<br>distance | Yes | No | Set | O(m+n) | |
6161

6262
[1] In this library, Levenshtein edit distance, LCS distance and their sibblings are computed using the **dynamic programming** method, which has a cost O(m.n). For Levenshtein distance, the algorithm is sometimes called **Wagner-Fischer algorithm** ("The string-to-string correction problem", 1974). The original algorithm uses a matrix of size m x n to store the Levenshtein distance between string prefixes.
6363

0 commit comments

Comments
 (0)