Interface EditDistance<R>
-
- Type Parameters:
R
- The type of similarity score unit used by this EditDistance.
- All Superinterfaces:
SimilarityScore<R>
- All Known Implementing Classes:
CosineDistance
,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 setS
is a functiond: [S * S] -> [0, INFINITY)
such that the following hold forx,y,z
in the setS
:d(x,y) >= 0
, non-negativity or separation axiomd(x,y) == 0
, if and only if,x == y
d(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
apply
method accepts a pair ofCharSequence
parameters and returns anR
type similarity score.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
apply(java.lang.CharSequence left, java.lang.CharSequence right)
Compares two CharSequences.
-
-
-
Method Detail
-
apply
R apply(java.lang.CharSequence left, java.lang.CharSequence right)
Compares two CharSequences.- Specified by:
apply
in interfaceSimilarityScore<R>
- Parameters:
left
- the first CharSequenceright
- the second CharSequence- Returns:
- The similarity score between two CharSequences
-
-