StringDistance
public class JaroWinklerDistance extends Object implements StringDistance
Constructor | Description |
---|---|
JaroWinklerDistance() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
void |
setThreshold(float threshold) |
Sets the threshold used to determine when Winkler bonus should be used.
|
public float getDistance(String s1, String s2)
StringDistance
getDistance
in interface StringDistance
s1
- The first string.s2
- The second string.public void setThreshold(float threshold)
threshold
- the new value of the thresholdpublic float getThreshold()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.