Interface SimilarityScore<R>
- Type Parameters:
R- The type of similarity score unit.
- All Superinterfaces:
BiFunction<CharSequence, CharSequence, R>, ObjectSimilarityScore<CharSequence, R>
- All Known Subinterfaces:
EditDistance<R>
- All Known Implementing Classes:
CosineDistance, DamerauLevenshteinDistance, HammingDistance, IntersectionSimilarity, JaccardDistance, JaccardSimilarity, JaroWinklerDistance, JaroWinklerSimilarity, LevenshteinDetailedDistance, LevenshteinDistance, LongestCommonSubsequence, LongestCommonSubsequenceDistance
Scores
CharSequence similarity, like a String.
A string similarity score is intended to have some of the properties of a metric, yet allowing for exceptions, like the Jaro-Winkler similarity score.
A similarity score is the function d: [X * X] -> [0, INFINITY) with the
following properties:
d(x,y) >= 0, non-negativity or separation axiomd(x,y) == d(y,x), symmetry.
Notice, these are two of the properties that contribute to d being a metric.
Further, this intended to be BiFunction<CharSequence, CharSequence, R>.
The apply method accepts a pair of CharSequence parameters
and returns an R type similarity score.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionapply(CharSequence left, CharSequence right) Compares two CharSequences.Methods inherited from interface BiFunction
andThen
-
Method Details
-
apply
Compares two CharSequences.- Specified by:
applyin interfaceBiFunction<CharSequence, CharSequence, R>- Specified by:
applyin interfaceObjectSimilarityScore<CharSequence, R>- Parameters:
left- the "left" or "first" input.right- the "right" or "second" input.- Returns:
- The similarity score between two CharSequences.
-