| Access | Constructor and Description |
|---|---|
| public | SorensenDice(final int k)
Sorensen-Dice coefficient, aka Sørensen index, Dice's coefficient or Czekanowski's binary (non-quantitative) index. |
| public | SorensenDice()
Sorensen-Dice coefficient, aka Sørensen index, Dice's coefficient or Czekanowski's binary (non-quantitative) index. |
| Modifier and Type | Method and Description |
|---|---|
| public final double | Returns: 1.0 - the computed similarityThe first string to compare. s1, final String The second string to compare. s2)Implements info. Returns 1 - similarity. |
| public final double | Returns: The computed Sorensen-Dice similarity.The first string to compare. s1, final String The second string to compare. s2)Implements info. Similarity is computed as 2 * |A inter B| / (|A| + |B|). |
| SorensenDice | back to summary |
|---|---|
| public SorensenDice(final int k) Sorensen-Dice coefficient, aka Sørensen index, Dice's coefficient or Czekanowski's binary (non-quantitative) index. The strings are first converted to boolean sets of k-shingles (sequences of k characters), then the similarity is computed as 2 * |A inter B| / (|A| + |B|). Attention: Sorensen-Dice distance (and similarity) does not satisfy triangle inequality. | |
| SorensenDice | back to summary |
|---|---|
| public SorensenDice() Sorensen-Dice coefficient, aka Sørensen index, Dice's coefficient or Czekanowski's binary (non-quantitative) index. The strings are first converted to boolean sets of k-shingles (sequences of k characters), then the similarity is computed as 2 * |A inter B| / (|A| + |B|). Attention: Sorensen-Dice distance (and similarity) does not satisfy triangle inequality. Default k is 3. | |
| distance | back to summary |
|---|---|
| public final double distance(final String s1, final String s2) Implements info. Returns 1 - similarity.
| |
| similarity | back to summary |
|---|---|
| public final double similarity(final String s1, final String s2) Implements info. Similarity is computed as 2 * |A inter B| / (|A| + |B|).
| |