public final class LuceneLevenshteinDistance extends java.lang.Object implements StringDistance
Constructor and Description |
---|
LuceneLevenshteinDistance()
Creates a new comparator, mimicing the behavior of Lucene's internal
edit distance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
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.
|
private static IntsRef |
toIntsRef(java.lang.String s) |
public LuceneLevenshteinDistance()
public float getDistance(java.lang.String target, java.lang.String other)
StringDistance
getDistance
in interface StringDistance
target
- The first string.other
- The second string.private static IntsRef toIntsRef(java.lang.String s)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object