|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.search.spell.JaroWinklerDistance
public class JaroWinklerDistance
Similarity measure for short strings such as person names.
| Constructor Summary | |
|---|---|
JaroWinklerDistance()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JaroWinklerDistance()
| Method Detail |
|---|
public float getDistance(String s1,
String s2)
StringDistance
getDistance in interface StringDistances1 - The first string.s2 - The second string.
public void setThreshold(float threshold)
threshold - the new value of the thresholdpublic float getThreshold()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||