Skip to content

Commit 2051c03

Browse files
committed
Maven installation
1 parent 18cb16b commit 2051c03

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ Currently implemeted:
66
- Levenshtein edit distance;
77
- Jaro-Winkler similarity;
88
- Longest Common Subsequence edit distance;
9-
- n-Gram distance.
9+
- Q-Gram (Jaccard index);
10+
- n-Gram distance (Kondrak).
1011

1112
## Download
13+
Using maven:
14+
```
15+
<dependency>
16+
<groupId>info.debatty</groupId>
17+
<artifactId>java-string-similarity</artifactId>
18+
<version>RELEASE</version>
19+
</dependency>
20+
```
21+
1222
See [releases](https://github.com/tdebatty/java-string-similarity/releases).
1323

1424
## Levenshtein
@@ -32,15 +42,17 @@ public class MyApp {
3242
## Jaro-Winkler
3343
Jaro-Winkler is a string edit distance that was developed in the area of record linkage (duplicate detection) (Winkler, 1990). The Jaro–Winkler distance metric is designed and best suited for short strings such as person names, and to detect typos.
3444

45+
It is (roughly) a variation of Levenshtein distance, where the substitution of 2 close characters is considered less important then the substitution of 2 characters that a far from each other.
46+
3547
```java
3648
import info.debatty.java.stringsimilarity.*;
3749

3850
public class MyApp {
39-
40-
51+
52+
4153
public static void main(String[] args) {
4254
JaroWinkler jw = new JaroWinkler();
43-
55+
4456
System.out.println(jw.distance("My string", "My $tring"));
4557
System.out.println(jw.similarity("My string", "My $tring"));
4658
}

0 commit comments

Comments
 (0)