| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final int | |
| private static final Pattern | SPACE_REG
Pattern for finding multiple following spaces. |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final int | |
| public final Map | Returns: the profile of this string, as an unmodifiable MapCompute and return the profile of s, as defined by Ukkonen "Approximate string-matching with q-grams and maximal matches". |
| DEFAULT_K | back to summary |
|---|---|
| private static final int DEFAULT_K | |
| k | back to summary |
|---|---|
| private final int k | |
| SPACE_REG | back to summary |
|---|---|
| private static final Pattern SPACE_REG Pattern for finding multiple following spaces. | |
| ShingleBased | back to summary |
|---|---|
public ShingleBased(final int k)
| |
| ShingleBased | back to summary |
|---|---|
| pack-priv ShingleBased() | |
| getK | back to summary |
|---|---|
| public final int getK() Return k, the length of k-shingles (aka n-grams).
| |
| getProfile | back to summary |
|---|---|
| public final Map Compute and return the profile of s, as defined by Ukkonen "Approximate string-matching with q-grams and maximal matches". https://www.cs.helsinki.fi/u/ukkonen/TCS92.pdf The profile is the number of occurrences of k-shingles, and is used to compute q-gram similarity, Jaccard index, etc. Pay attention: the memory requirement of the profile can be up to k * size of the string | |