You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/20 19:21:12 UTC
[jira] [Commented] (LANG-1199) Incorrect implementation of
StringUtils.getJaroWinklerDistance()
[ https://issues.apache.org/jira/browse/LANG-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15294010#comment-15294010 ]
ASF GitHub Bot commented on LANG-1199:
--------------------------------------
GitHub user PascalSchumacher opened a pull request:
https://github.com/apache/commons-lang/pull/148
LANG-1199: Incorrect implementation of StringUtils#getJaroWinklerDist…
…ance()
replace current implementation with Jaro-Winkler distance implementation of Apache Lucene
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/PascalSchumacher/commons-lang jaro
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/148.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #148
----
commit 3d8ff5286f174cfd8ceb8b98ff22b73897f2470d
Author: pascalschumacher <pa...@gmx.net>
Date: 2016-05-20T19:18:47Z
LANG-1199: Incorrect implementation of StringUtils#getJaroWinklerDistance()
replace current implementation with Jaro-Winkler distance implementation of Apache Lucene
----
> Incorrect implementation of StringUtils.getJaroWinklerDistance()
> ----------------------------------------------------------------
>
> Key: LANG-1199
> URL: https://issues.apache.org/jira/browse/LANG-1199
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.4
> Reporter: M. Steiger
>
> The current implementation of StringUtils.getJaroWinklerDistance() does not compute the correct result in some cases. See #LANG-944 for the initial code contribution.
> StringUtils.getJaroWinklerDistance("Haus Ingeborg", "Ingeborg Esser") == 0.0
> This is due to the incorrect computation of common characters, which causes the algorithm to exit prematurely.
> In contrast, the implementation in Lucene gives ~0.63, which is about right.
> JaroWinklerDistance d = new JaroWinklerDistance();
> getDistance("Haus Ingeborg", "Ingeborg Esser");
> See https://lucene.apache.org/core/3_0_3/api/contrib-spellchecker/org/apache/lucene/search/spell/JaroWinklerDistance.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)