Interface EditDistance<R>
-
- Type Parameters:
R- The type of similarity score unit used by this EditDistance.
- All Superinterfaces:
java.util.function.BiFunction<java.lang.CharSequence,java.lang.CharSequence,R>,ObjectSimilarityScore<java.lang.CharSequence,R>,SimilarityScore<R>
- All Known Implementing Classes:
CosineDistance,DamerauLevenshteinDistance,HammingDistance,JaccardDistance,JaroWinklerDistance,LevenshteinDetailedDistance,LevenshteinDistance,LongestCommonSubsequenceDistance
public interface EditDistance<R> extends SimilarityScore<R>
Interface for Edit Distances.An edit distance is a formal metric on the Kleene closure (
X<sup>*</sup>) over an alphabet (X). Note, that a metric on a setSis a functiond: [S * S] -> [0, INFINITY)such that the following hold forx,y,zin the setS:d(x,y) >= 0, non-negativity or separation axiomd(x,y) == 0, if and only if,x == yd(x,y) == d(y,x), symmetry, andd(x,z) <= d(x,y) + d(y,z), the triangle inequality
This is a BiFunction<CharSequence, CharSequence, R>. The
applymethod accepts a pair ofCharSequenceparameters and returns anRtype similarity score.- Since:
- 1.0
-
-
Method Summary
-
Methods inherited from interface org.apache.commons.text.similarity.SimilarityScore
apply
-
-