Top Description Methods
org.apache.commons.text.similarity

public Interface ObjectSimilarityScore<T, R>

extends BiFunction<T, T, R>
Known Direct Subinterfaces
org.apache.commons.text.similarity.SimilarityScore
Type Parameters
<T>
The left and right input type.
<R>
The type of similarity score unit used by this score.
Imports
java.util.function.BiFunction

Scores the similarity between two Objects of the same type.

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:

Notice, these are two of the properties that contribute to d being a metric.

Since
1.13.0

Method Summary

Modifier and TypeMethod and Description
public R

Returns:

The similarity score between two Objects.
apply
(T
the "left" or "first" input.
left
,
T
the "right" or "second" input.
right
)

Redeclares java.util.function.BiFunction.apply.

Compares two Objects.

Inherited from java.util.function.BiFunction:
andThen

Method Detail

applyback to summary
public R apply(T left, T right)

Redeclares java.util.function.BiFunction.apply.

Compares two Objects.

Parameters
left:T

the "left" or "first" input.

right:T

the "right" or "second" input.

Returns:R

The similarity score between two Objects.

Annotations
@Override