|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.spell.LevensteinDistance
public final class LevensteinDistance
Levenstein edit distance class.
Constructor Summary | |
---|---|
LevensteinDistance()
Optimized to run a bit faster than the static getDistance(). |
Method Summary | |
---|---|
float |
getDistance(java.lang.String target,
java.lang.String other)
Returns a float between 0 and 1 based on how similar the specified strings are to one another. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LevensteinDistance()
Method Detail |
---|
public float getDistance(java.lang.String target, java.lang.String other)
StringDistance
getDistance
in interface StringDistance
target
- The first string.other
- The second string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |