Skip to content

Commit 045a060

Browse files
committed
Added computation cost
1 parent 4dfccc5 commit 045a060

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ For these algorithms, another use case is possible when dealing with large datas
5353

5454
## Summary
5555

56-
The main characteristics of each implemented algorithm are presented below:
57-
58-
| | | Normalized? | Metric? | Type |
59-
|-------- |------- |------------- |---------- | ------ |
60-
| Levenshtein |distance | No | Yes | |
61-
| Normalized Levenshtein |distance<br>similarity | Yes | No | |
62-
| Weighted Levenshtein |distance | No | No | |
63-
| Damerau-Levenshtein |distance | No | No | |
64-
| Jaro-Winkler |similarity<br>distance | Yes | No | |
65-
| Longest Common Subsequence |distance | No | No | |
66-
| Metric Longest Common Subsequence |distance | Yes | No | |
67-
| N-Gram (Kondrak) |distance | Yes | No | |
68-
| Q-Gram |distance | No | No | Profile |
69-
| Cosine |similarity<br>distance | Yes | No | Profile |
70-
| Jaccard |similarity<br>distance | Yes | Yes | Set |
71-
| Sorensen-Dice |similarity<br>distance | Yes | No | Set |
56+
The main characteristics of each implemented algorithm are presented below. The "cost" column givs an estimation of the computational cost to compute te similarity between two strings of length m and n respectively.
57+
58+
| | | Normalized? | Metric? | Type | Cost |
59+
|-------- |------- |------------- |---------- | ------ | ---- |
60+
| Levenshtein |distance | No | Yes | | O(m.n) |
61+
| Normalized Levenshtein |distance<br>similarity | Yes | No | | O(m.n) |
62+
| Weighted Levenshtein |distance | No | No | | O(m.n) |
63+
| Damerau-Levenshtein |distance | No | No | | O(m.n) |
64+
| Jaro-Winkler |similarity<br>distance | Yes | No | | O(m.n) |
65+
| Longest Common Subsequence |distance | No | No | | O(m.n) |
66+
| Metric Longest Common Subsequence |distance | Yes | No | | O(m.n) |
67+
| N-Gram (Kondrak) |distance | Yes | No | | O(m.n) |
68+
| Q-Gram |distance | No | No | Profile | O(m+n) |
69+
| Cosine |similarity<br>distance | Yes | No | Profile | O(m+n) |
70+
| Jaccard |similarity<br>distance | Yes | Yes | Set | O(m+n) |
71+
| Sorensen-Dice |similarity<br>distance | Yes | No | Set | O(m+n) |
7272

7373
## Levenshtein
7474
The Levenshtein distance between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other.

0 commit comments

Comments
 (0)