Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f6c7aad

Browse files
committed
Update README.md
Cosmetic edit
1 parent 08c5cec commit f6c7aad

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

‎README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ A library implementing different string similarity and distance measures. A doze
2222
* [Cosine similarity](#shingle-n-gram-based-algorithms)
2323
* [Jaccard index](#shingle-n-gram-based-algorithms)
2424
* [Sorensen-Dice coefficient](#shingle-n-gram-based-algorithms)
25+
* [Ratcliff-Obershelp](#ratcliff-obershelp)
2526
* [Experimental](#experimental)
2627
* [SIFT4](#sift4)
27-
* [Ratcliff-Obershelp](#ratcliff-obershelp)
2828
* [Users](#users)
2929

3030

@@ -445,29 +445,8 @@ Similar to Jaccard index, but this time the similarity is computed as 2 * |V1 in
445445

446446
Distance is computed as 1 - similarity.
447447

448-
## Experimental
449-
450-
### SIFT4
451-
SIFT4 is a general purpose string distance algorithm inspired by JaroWinkler and Longest Common Subsequence. It was developed to produce a distance measure that matches as close as possible to the human perception of string distance. Hence it takes into account elements like character substitution, character distance, longest common subsequence etc. It was developed using experimental testing, and without theoretical background.
452-
453-
```
454-
import info.debatty.java.stringsimilarity.experimental.Sift4;
455-
456-
public class MyApp {
457-
458-
public static void main(String[] args) {
459-
String s1 = "This is the first string";
460-
String s2 = "And this is another string";
461-
Sift4 sift4 = new Sift4();
462-
sift4.setMaxOffset(5);
463-
double expResult = 11.0;
464-
double result = sift4.distance(s1, s2);
465-
assertEquals(expResult, result, 0.0);
466-
}
467-
}
468-
```
469448
## Ratcliff-Obershelp
470-
Gestalt Pattern Matching, also Ratcliff/Obershelp Pattern Recognition, is a string-matching algorithm for determining the similarity of two strings. It was developed in 1983 by John W. Ratcliff and John A. Obershelp and published in the Dr. Dobb's Journal in July 1988
449+
Ratcliff/Obershelp Pattern Recognition, also known as Gestalt Pattern Matching, is a string-matching algorithm for determining the similarity of two strings. It was developed in 1983 by John W. Ratcliff and John A. Obershelp and published in the Dr. Dobb's Journal in July 1988
471450

472451
Ratcliff/Obershelp computes the similarity between 2 strings, and the returned value lies in the interval [0.0, 1.0].
473452

@@ -498,6 +477,28 @@ will produce:
498477
0.7777777777777778
499478
```
500479

480+
## Experimental
481+
482+
### SIFT4
483+
SIFT4 is a general purpose string distance algorithm inspired by JaroWinkler and Longest Common Subsequence. It was developed to produce a distance measure that matches as close as possible to the human perception of string distance. Hence it takes into account elements like character substitution, character distance, longest common subsequence etc. It was developed using experimental testing, and without theoretical background.
484+
485+
```
486+
import info.debatty.java.stringsimilarity.experimental.Sift4;
487+
488+
public class MyApp {
489+
490+
public static void main(String[] args) {
491+
String s1 = "This is the first string";
492+
String s2 = "And this is another string";
493+
Sift4 sift4 = new Sift4();
494+
sift4.setMaxOffset(5);
495+
double expResult = 11.0;
496+
double result = sift4.distance(s1, s2);
497+
assertEquals(expResult, result, 0.0);
498+
}
499+
}
500+
```
501+
501502
## Users
502503
* [StringSimilarity.NET](https://github.com/feature23/StringSimilarity.NET) a .NET port of java-string-similarity
503504
* [OrientDB string-metrics](https://github.com/orientechnologies/extra-functions/tree/master/string-metrics) wraps java-string-similarity to provide different string similarity and distance measures as SQL functions in [OrientDB](https://github.com/orientechnologies/orientdb)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /