@Description(value="Levenshtein distance, normalized by average string length.") @Reference(authors="V. I. Levenshtein", title="Binary codes capable of correcting deletions, insertions and reversals.", booktitle="Soviet physics doklady. Vol. 10. 1966.") public class NormalizedLevenshteinDistanceFunction extends AbstractPrimitiveDistanceFunction<String,DoubleDistance>
V. I. Levenshtein
Binary codes capable of correcting deletions, insertions and reversals.
Soviet physics doklady. Vol. 10. 1966.
Modifier and Type | Class and Description |
---|---|
static class |
NormalizedLevenshteinDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static NormalizedLevenshteinDistanceFunction |
STATIC_SENSITIVE
Static instance, case sensitive.
|
Constructor and Description |
---|
NormalizedLevenshteinDistanceFunction()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
distance(String o1,
String o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
SimpleTypeInformation<? super String> |
getInputTypeRestriction()
Get the input data type of the function.
|
instantiate, isMetric, isSymmetric
public static final NormalizedLevenshteinDistanceFunction STATIC_SENSITIVE
@Deprecated public NormalizedLevenshteinDistanceFunction()
public DoubleDistance distance(String o1, String o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<String,DoubleDistance>
distance
in class AbstractPrimitiveDistanceFunction<String,DoubleDistance>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<String,DoubleDistance>
getDistanceFactory
in class AbstractPrimitiveDistanceFunction<String,DoubleDistance>
public SimpleTypeInformation<? super String> getInputTypeRestriction()
DistanceFunction