| Modifier and Type | Field and Description |
|---|---|
| private static final double | |
| private static final double | |
| private static final int | |
| private final double |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JaroWinkler(final double threshold)
Instantiate with given threshold to determine when Winkler bonus should be used. |
| Modifier and Type | Method and Description |
|---|---|
| public final double | Returns: 1 - similarity.The first string to compare. s1, final String The second string to compare. s2)Implements info. Return 1 - similarity. |
| public final double | Returns: the current value of the thresholdReturns the current value of the threshold used for adding the Winkler bonus. |
| private int[] | |
| public final double | Returns: The Jaro-Winkler similarity in the range [0, 1]The first string to compare. s1, final String The second string to compare. s2)Implements info. Compute Jaro-Winkler similarity. |
| DEFAULT_THRESHOLD | back to summary |
|---|---|
| private static final double DEFAULT_THRESHOLD | |
| JW_COEF | back to summary |
|---|---|
| private static final double JW_COEF | |
| THREE | back to summary |
|---|---|
| private static final int THREE | |
| threshold | back to summary |
|---|---|
| private final double threshold | |
| JaroWinkler | back to summary |
|---|---|
| public JaroWinkler() Instantiate with default threshold (0.7). | |
| JaroWinkler | back to summary |
|---|---|
| public JaroWinkler(final double threshold) Instantiate with given threshold to determine when Winkler bonus should be used. Set threshold to a negative value to get the Jaro distance. | |
| distance | back to summary |
|---|---|
| public final double distance(final String s1, final String s2) Implements info. Return 1 - similarity.
| |
| getThreshold | back to summary |
|---|---|
| public final double getThreshold() Returns the current value of the threshold used for adding the Winkler bonus. The default value is 0.7.
| |
| matches | back to summary |
|---|---|
| private int[] matches(final String s1, final String s2) | |
| similarity | back to summary |
|---|---|
| public final double similarity(final String s1, final String s2) Implements info. Compute Jaro-Winkler similarity.
| |