It utilizes the CosineSimilarity to compute the distance. Character sequences
are converted into vectors through a simple tokenizer that works with a regular expression
to split words in a sentence.
For further explanation about Cosine Similarity and Cosine Distance, refer to https://en.wikipedia.org/wiki/Cosine_similarity.
CosineSimilarity
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Double | apply(final CharSequence left, final CharSequence right)
Implements org. Compares two CharSequences. |
| CosineDistance | back to summary |
|---|---|
| public CosineDistance() Construct a new instance. | |
| apply | back to summary |
|---|---|
| public Double apply(final CharSequence left, final CharSequence right) Implements org. Doc from org. Compares two CharSequences.
| |