| Access | Constructor and Description |
|---|---|
| public | Jaccard(final int k)
The strings are first transformed into sets of k-shingles (sequences of k characters), then Jaccard index is computed as |A inter B| / |A union B|. |
| public | Jaccard()
The strings are first transformed into sets of k-shingles (sequences of k characters), then Jaccard index is computed as |A inter B| / |A union B|. |
| Modifier and Type | Method and Description |
|---|---|
| public final double | Returns: 1 - the Jaccard similarity.The first string to compare. s1, final String The second string to compare. s2)Implements info. Distance is computed as 1 - similarity. |
| public final double | Returns: The Jaccard index in the range [0, 1]The first string to compare. s1, final String The second string to compare. s2)Implements info. Compute Jaccard index: |A inter B| / |A union B|. |
| Jaccard | back to summary |
|---|---|
| public Jaccard(final int k) The strings are first transformed into sets of k-shingles (sequences of k characters), then Jaccard index is computed as |A inter B| / |A union B|. The default value of k is 3. | |
| Jaccard | back to summary |
|---|---|
| public Jaccard() The strings are first transformed into sets of k-shingles (sequences of k characters), then Jaccard index is computed as |A inter B| / |A union B|. The default value of k is 3. | |
| distance | back to summary |
|---|---|
| public final double distance(final String s1, final String s2) Implements info. Distance is computed as 1 - similarity.
| |
| similarity | back to summary |
|---|---|
| public final double similarity(final String s1, final String s2) Implements info. Compute Jaccard index: |A inter B| / |A union B|.
| |