Quantcast

[jira] [Closed] (LANG-1269) Wrong name or result of StringUtils::getJaroWinklerDistance

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Closed] (LANG-1269) Wrong name or result of StringUtils::getJaroWinklerDistance

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LANG-1269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pascal Schumacher closed LANG-1269.
-----------------------------------
    Resolution: Won't Fix

I reverted the addition of StringUtils#getJaroWinklerSimilarity in https://github.com/apache/commons-lang/commit/f4ee399e31eb61741f5f2167d6af8f49c0e991b6 because all string distance methods of commons-lang are now deprecated in favor of commons-text.

> Wrong name or result of StringUtils::getJaroWinklerDistance
> -----------------------------------------------------------
>
>                 Key: LANG-1269
>                 URL: https://issues.apache.org/jira/browse/LANG-1269
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.3, 3.4, 3.5
>            Reporter: Jan Martin Keil
>            Assignee: Pascal Schumacher
>            Priority: Minor
>
> The name of the method StringUtils::getJaroWinklerDistance is misleading.
> Currently for equal strings {{1}} is returned, for completely different strings {{0}} is returned. That is a measure of similarity, not of a distance. A distance must be {{0}} for equal strings. I read on the issues LANG-591 and LANG-944, that it was decided to have a similar name to StringUtils::getLevenshteinDistance, but that requires also the change of the methods result.
> Could you please (1) rename the method to StringUtils::getJaroWinklerSimilarity or (2) change the method to return {{1 - currentResult}}?
> First option has the disadvantage to lose the similar naming of the similar methods, second option implies the risk to unnoticed introduce bugs in depending code. So I think it is preferable to use the first option.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Loading...