@Immutable public class JaroWinkler extends Object implements NormalizedStringSimilarity, NormalizedStringDistance
Constructor and Description |
---|
JaroWinkler()
Instantiate with default threshold (0.7).
|
JaroWinkler(double threshold)
Instantiate with given threshold to determine when Winkler bonus should
be used.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(String s1,
String s2)
Return 1 - similarity.
|
double |
getThreshold()
Returns the current value of the threshold used for adding the Winkler
bonus.
|
double |
similarity(String s1,
String s2)
Compute JW similarity.
|
public JaroWinkler()
public JaroWinkler(double threshold)
threshold
- public final double getThreshold()
public final double similarity(String s1, String s2)
similarity
in interface StringSimilarity
s1
- s2
- public final double distance(String s1, String s2)
distance
in interface StringDistance
s1
- s2
- Copyright © 2016. All rights reserved.