- Type Parameters:
R- The type of similarity score unit used by this EditDistance.
- All Known Subinterfaces:
- All Known Implementing Classes:
public interface SimilarityScore<R>
A string similarity score is intended to have some of the properties of a metric, yet allowing for exceptions, namely the Jaro-Winkler similarity score.
We Define a SimilarityScore to be a function
d: [X * X] -> [0, INFINITY) with the
d(x,y) >= 0, non-negativity or separation axiom
d(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>.
accepts a pair of
and returns an
R type similarity score. We have omitted the explicit
statement of extending BiFunction due to it only being implemented in Java 1.8, and we
wish to maintain Java 1.7 compatibility.
Compares two CharSequences.
left- the first CharSequence
right- the second CharSequence
- The similarity score between two CharSequences