public final class LevenshteinDistance extends Object implements StringDistance
Constructor and Description |
---|
LevenshteinDistance()
Optimized to run a bit faster than the static getDistance().
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
float |
getDistance(String target,
String other)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
|
int |
hashCode() |
String |
toString() |
public LevenshteinDistance()
public float getDistance(String target, String other)
StringDistance
getDistance
in interface StringDistance
target
- The first string.other
- The second string.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.