Package org.somox.metrics.naming
Class JaroWinkler
java.lang.Object
org.somox.metrics.naming.JaroWinkler
The Jaro–Winkler similarity is a string metric measuring an edit distance
between two sequences.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
JaroWinkler
public JaroWinkler()
-
-
Method Details
-
distance
The higher the Jaro–Winkler distance for two strings is, the less similar the strings are. The score is normalized such that 0 means an exact match and 1 means there is no similarity. The original paper actually defined the metric in terms of similarity, so the distance is defined as the inversion of that value (distance = 1 − similarity).- Parameters:
s
- the first given stringt
- the second given string- Returns:
- the distance between s and t
-