public class JaroWinkler extends Object implements NormalizedStringSimilarity, NormalizedStringDistance
Constructor and Description |
---|
JaroWinkler() |
JaroWinkler(double threshold) |
Modifier and Type | Method and Description |
---|---|
double |
distance(String s1,
String s2) |
double |
getThreshold()
Returns the current value of the threshold used for adding the Winkler
bonus.
|
static void |
main(String[] args) |
void |
setThreshold(double threshold)
Sets the threshold used to determine when Winkler bonus should be used.
|
double |
similarity(String s1,
String s2)
Compute and return a measure of similarity between 2 strings.
|
public JaroWinkler()
public JaroWinkler(double threshold)
public static void main(String[] args)
public final void setThreshold(double threshold)
threshold
- the new value of the thresholdpublic double getThreshold()
public double similarity(String s1, String s2)
StringSimilarity
similarity
in interface StringSimilarity
public double distance(String s1, String s2)
distance
in interface StringDistance
Copyright © 2015. All rights reserved.