public final class LuceneLevenshteinDistance extends 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 |
---|---|
float |
getDistance(String target,
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(String target, String other)
StringDistance
getDistance
in interface StringDistance
target
- The first string.other
- The second string.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.