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.
|
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.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.