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