public class JaroWinklerDistance extends Object implements StringDistance
| Constructor and Description |
|---|
JaroWinklerDistance()
Creates a new distance metric with the default threshold
for the Jaro Winkler bonus (0.7)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
float |
getDistance(String s1,
String s2)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
|
float |
getThreshold()
Returns the current value of the threshold used for adding the Winkler bonus.
|
int |
hashCode() |
void |
setThreshold(float threshold)
Sets the threshold used to determine when Winkler bonus should be used.
|
String |
toString() |
public JaroWinklerDistance()
setThreshold(float)public float getDistance(String s1, String s2)
StringDistancegetDistance in interface StringDistances1 - The first string.s2 - The second string.public void setThreshold(float threshold)
threshold - the new value of the thresholdpublic float getThreshold()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.