public final class Jaro extends Object implements StringMetric, StringDistance
similarity(a,b) = jaro(a,b)
distance(a,b) = 1 - similarity(a,b)
This class is immutable and thread-safe.
JaroWinkler| Constructor and Description |
|---|
Jaro() |
| Modifier and Type | Method and Description |
|---|---|
float |
compare(String a,
String b)
Measures the similarity between strings a and b.
|
float |
distance(String a,
String b)
Measures the distance between string a and b.
|
String |
toString() |
public float distance(String a, String b)
StringDistance0.0 indicates that a and
b are similar.distance in interface Distance<String>distance in interface StringDistancea - string a to compareb - string b to comparepublic float compare(String a, String b)
StringMetriccompare in interface Metric<String>compare in interface StringMetrica - string a to compareb - string b to compareCopyright © 2014–2016. All rights reserved.