public class JaroWinkler extends Object implements NormalizedStringSimilarity, NormalizedStringDistance
| Constructor and Description |
|---|
JaroWinkler() |
JaroWinkler(double threshold) |
| Modifier and Type | Method and Description |
|---|---|
double |
distance(String s1,
String s2) |
double |
getThreshold()
Returns the current value of the threshold used for adding the Winkler
bonus.
|
void |
setThreshold(double threshold)
Sets the threshold used to determine when Winkler bonus should be used.
|
double |
similarity(String s1,
String s2)
Compute and return a measure of similarity between 2 strings.
|
public JaroWinkler()
public JaroWinkler(double threshold)
public final void setThreshold(double threshold)
threshold - the new value of the thresholdpublic double getThreshold()
public double similarity(String s1, String s2)
StringSimilaritysimilarity in interface StringSimilaritypublic double distance(String s1, String s2)
distance in interface StringDistanceCopyright © 2016. All rights reserved.