The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters. Winkler increased this measure for matching initial characters.
This implementation is based on the Jaro Winkler similarity algorithm from https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance.
This code has been adapted from Apache Commons Lang 3.3.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final JaroWinklerSimilarity | INSTANCE
The singleton instance. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Double | Returns: result similarity.the first input, must not be null. left, final CharSequence the second input, must not be null. right)Implements org. Computes the Jaro Winkler Similarity between two character sequences. |
| public < The type of similarity score unit. E> Double | Returns: result similarity.the first input, must not be null. left, final SimilarityInput<E> the second input, must not be null. right)Implements org. Computes the Jaro Winkler Similarity between two character sequences. |
| protected static int[] | Returns: mtp array containing: matches, half transpositions, and prefix.the first input to be matched. first, final CharSequence the second input to be matched. second)Computes the Jaro-Winkler string matches, half transpositions, prefix array. |
| protected static < The type of similarity score unit. E> int[] | Returns: mtp array containing: matches, half transpositions, and prefix.the first input to be matched. first, final SimilarityInput<E> the second input to be matched. second)Computes the Jaro-Winkler string matches, half transpositions, prefix array. |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final JaroWinklerSimilarity INSTANCE The singleton instance. | |
| JaroWinklerSimilarity | back to summary |
|---|---|
| public JaroWinklerSimilarity() Creates a new instance. | |
| apply | back to summary |
|---|---|
| public Double apply(final CharSequence left, final CharSequence right) Implements org. Computes the Jaro Winkler Similarity between two character sequences. sim.apply(null, null) = Throws
| |
| apply | back to summary |
|---|---|
| public <E> Double apply(final SimilarityInput<E> left, final SimilarityInput<E> right) Implements org. Computes the Jaro Winkler Similarity between two character sequences. sim.apply(null, null) = Throws
| |
| matches | back to summary |
|---|---|
| protected static int[] matches(final CharSequence first, final CharSequence second) Computes the Jaro-Winkler string matches, half transpositions, prefix array.
| |
| matches | back to summary |
|---|---|
| protected static <E> int[] matches(final SimilarityInput<E> first, final SimilarityInput<E> second) Computes the Jaro-Winkler string matches, half transpositions, prefix array.
| |