|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.deduping.metrics.StringMetric
An abstract class that returns a measure of similarity between strings
Constructor Summary | |
StringMetric()
|
Method Summary | |
abstract java.lang.Object |
clone()
Create a copy of this metric |
abstract double |
distance(java.lang.String s1,
java.lang.String s2)
Compute a measure of distance between two strings |
static StringMetric |
forName(java.lang.String metricName,
java.lang.String[] options)
Creates a new instance of a metric given it's class name and (optional) arguments to pass to it's setOptions method. |
abstract boolean |
isDistanceBased()
The computation of a metric can be either based on distance, or on similarity |
abstract double |
similarity(java.lang.String s1,
java.lang.String s2)
Compute a measure of similarity between two strings |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringMetric()
Method Detail |
public abstract double distance(java.lang.String s1, java.lang.String s2) throws java.lang.Exception
s1
- first strings2
- second string
java.lang.Exception
public abstract double similarity(java.lang.String s1, java.lang.String s2) throws java.lang.Exception
s1
- first strings2
- second string
java.lang.Exception
public abstract boolean isDistanceBased()
public abstract java.lang.Object clone()
public static StringMetric forName(java.lang.String metricName, java.lang.String[] options) throws java.lang.Exception
metricName
- the fully qualified class name of the metricoptions
- an array of options suitable for passing to setOptions. May
be null.
java.lang.Exception
- if the metric name is invalid, or the options
supplied are not acceptable to the metric
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |