Package org.openrefine.clustering.knn
Class VicinoDistance
- java.lang.Object
-
- org.openrefine.clustering.knn.VicinoDistance
-
- All Implemented Interfaces:
SimilarityDistance
public class VicinoDistance extends Object implements SimilarityDistance
Wrapper to expose a similarity function from the Vicino library.- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description VicinoDistance(edu.mit.simile.vicino.distances.Distance d)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
compute(String a, String b)
Compute the distance between two strings.
-
-
-
Method Detail
-
compute
public double compute(String a, String b)
Description copied from interface:SimilarityDistance
Compute the distance between two strings. This should return 0 when the two arguments are equal, and rise as their differences increase.- Specified by:
compute
in interfaceSimilarityDistance
-
-