| 
|||||||||
| 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()
Creates a new distance metric with the default threshold for the Jaro Winkler bonus (0.7)  | 
|
| Method Summary | |
|---|---|
 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()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public JaroWinklerDistance()
setThreshold(float)| 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()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||