public class JaroWinklerDistance extends java.lang.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(java.lang.Object obj) |
float |
getDistance(java.lang.String s1,
java.lang.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.
|
java.lang.String |
toString() |
public JaroWinklerDistance()
setThreshold(float)public float getDistance(java.lang.String s1,
java.lang.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()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectData In Motion GmbH all rights reserved