Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Duplicate
-
1.9
-
None
-
Mac OS, jdk-15.0.1.jdk
Description
This class is returning 1 - distance, but its contract is to return distance.
These are some examples from in the javadoc of the apply() method:
distance.apply("foo", "foo") = 0.0
distance.apply("hello", "hallo") = 0.12
distance.apply("fly", "ant") = 1.0
but execution of the method produces the compliment: 1.0, 0.88 and 0.0
Test code:
System.out.println(new JaroWinklerDistance().apply("foo", "foo"));
System.out.println(new JaroWinklerDistance().apply("hello", "hallo"));
System.out.println(new JaroWinklerDistance().apply("fly", "ant"));
Actual output:
1.0
0.88
0.0
Expected output:
0.0
0.12
1.0
Java version: jdk-15.0.1.jdk
Attachments
Issue Links
- is duplicated by
-
TEXT-191 JaroWinklerDistance returns the same values as JaroWinklerSimilarity
- Resolved