You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/07/19 13:33:54 UTC
[commons-text] branch master updated: (doc) Fixed wrong value for
Jaro-Winkler example (#117)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push:
new 67a343f (doc) Fixed wrong value for Jaro-Winkler example (#117)
67a343f is described below
commit 67a343f016e3224fb064d3f261178a114c5a5300
Author: luksan47 <no...@gmail.com>
AuthorDate: Fri Jul 19 15:33:50 2019 +0200
(doc) Fixed wrong value for Jaro-Winkler example (#117)
Docs had wrong value, different from test and the formula.
---
.../java/org/apache/commons/text/similarity/JaroWinklerDistance.java | 2 +-
.../java/org/apache/commons/text/similarity/JaroWinklerSimilarity.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java b/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
index a033f88..044a36c 100644
--- a/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java
@@ -53,7 +53,7 @@ public class JaroWinklerDistance implements EditDistance<Double> {
* distance.apply("hippo", "elephant") = 0.56
* distance.apply("hippo", "zzzzzzzz") = 1.0
* distance.apply("hello", "hallo") = 0.12
- * distance.apply("ABC Corporation", "ABC Corp") = 0.07
+ * distance.apply("ABC Corporation", "ABC Corp") = 0.09
* distance.apply("D N H Enterprises Inc", "D & H Enterprises, Inc.") = 0.05
* distance.apply("My Gym Children's Fitness Center", "My Gym. Childrens Fitness") = 0.08
* distance.apply("PENNSYLVANIA", "PENNCISYLVNIA") = 0.12
diff --git a/src/main/java/org/apache/commons/text/similarity/JaroWinklerSimilarity.java b/src/main/java/org/apache/commons/text/similarity/JaroWinklerSimilarity.java
index a159ba8..058d369 100644
--- a/src/main/java/org/apache/commons/text/similarity/JaroWinklerSimilarity.java
+++ b/src/main/java/org/apache/commons/text/similarity/JaroWinklerSimilarity.java
@@ -64,7 +64,7 @@ public class JaroWinklerSimilarity implements SimilarityScore<Double> {
* sim.apply("hippo", "elephant") = 0.44
* sim.apply("hippo", "zzzzzzzz") = 0.0
* sim.apply("hello", "hallo") = 0.88
- * sim.apply("ABC Corporation", "ABC Corp") = 0.93
+ * sim.apply("ABC Corporation", "ABC Corp") = 0.91
* sim.apply("D N H Enterprises Inc", "D & H Enterprises, Inc.") = 0.95
* sim.apply("My Gym Children's Fitness Center", "My Gym. Childrens Fitness") = 0.92
* sim.apply("PENNSYLVANIA", "PENNCISYLVNIA") = 0.88