@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>
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 |
---|---|
double |
distance(String o1,
String o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
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 double distance(String o1, String o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<String>
distance
in class AbstractPrimitiveDistanceFunction<String>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic static int levenshteinDistance(String o1, String o2)
o1
- First stringo2
- Second stringpublic SimpleTypeInformation<? super String> getInputTypeRestriction()
DistanceFunction
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.