Skip to content

Commit a9d6a2b

Browse files
committed
Definition of Q-Gram similarity
1 parent c21f271 commit a9d6a2b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public class MyApp {
7878

7979
## Q-Gram
8080

81-
Q-Gram edit distance, not to confuse with N-Gram distance defined by Kondrak (below), is the relative number of n-grams both strings have in common.
81+
Q-Gram similarity, not to confuse with N-Gram distance defined by Kondrak (below), is the relative number of n-grams both strings have in common. It is thus the Jaccard index between the strings considered as sets of n-grams. The computed similarity and distance are relative value (between 0 and 1).
8282

8383
```java
8484
import info.debatty.java.stringsimilarity.*;

src/info/debatty/java/stringsimilarity/QGram.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
/**
44
* QGram similarity is the relative number of n-grams both strings have in
5-
* common.
5+
* common. It is thus the Jaccard index between strings, considered as sets
6+
* of n-grams. The computed similarity and distance are relative value (between
7+
* 0 and 1).
68
*
79
* @author Thibault Debatty
810
*/

0 commit comments

Comments
 (0)