commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEXT-130) JaroWinklerDistance: Wrong results due to precision of transpositions
Date Thu, 02 Aug 2018 21:41:00 GMT

    [ https://issues.apache.org/jira/browse/TEXT-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16567516#comment-16567516
] 

ASF GitHub Bot commented on TEXT-130:
-------------------------------------

Github user coveralls commented on the issue:

    https://github.com/apache/commons-text/pull/87
  
    
    [![Coverage Status](https://coveralls.io/builds/18301471/badge)](https://coveralls.io/builds/18301471)
    
    Coverage remained the same at 97.833% when pulling **5d148549bc6ea8501016856547e27aed58b116c3
on jmkeil:master** into **802258f6370e4f9e12fb23ff2eb5f62c49011f13 on apache:master**.



> JaroWinklerDistance: Wrong results due to precision of transpositions
> ---------------------------------------------------------------------
>
>                 Key: TEXT-130
>                 URL: https://issues.apache.org/jira/browse/TEXT-130
>             Project: Commons Text
>          Issue Type: Bug
>            Reporter: Jan Martin Keil
>            Priority: Major
>
> The method {{JaroWinklerDistance#matches}} returns {{transpositions / 2}} as integer.
However, it is not granted for {{transpositions}} to be even. E.g. comparing "aaabcd" and
"aaacdb" will result in {{transpositions}} = 3. Therefore the method must return 1.5, not
1. Otherwise the similarity is 0.9611111111111111 instead of 0.9416666666666667.
> I recommend to return {{halfTranspositions}} instead of {{transpositions}} and doing
the cast and division ({{(double) mtp[1] / 2}}) in {{JaroWinklerDistance#apply}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message