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 2021/04/09 22:27:00 UTC

[jira] [Work logged] (TEXT-191) JaroWinklerDistance returns the same values as JaroWinklerSimilarity

     [ https://issues.apache.org/jira/browse/TEXT-191?focusedWorklogId=580380&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580380 ]

ASF GitHub Bot logged work on TEXT-191:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Apr/21 22:26
            Start Date: 09/Apr/21 22:26
    Worklog Time Spent: 10m 
      Work Description: coveralls edited a comment on pull request #214:
URL: https://github.com/apache/commons-text/pull/214#issuecomment-816463405


   
   [![Coverage Status](https://coveralls.io/builds/38692925/badge)](https://coveralls.io/builds/38692925)
   
   Coverage decreased (-0.7%) to 97.985% when pulling **380cbb0e1e54e229c69f86d810ea354a8271882b on bradleyrumball:fix-JaroWinklerDistance** into **7afa58a3c873e2f1c6b8ca225fe8ca7f8698d155 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 580380)
    Remaining Estimate: 0h
            Time Spent: 10m

> JaroWinklerDistance returns the same values as JaroWinklerSimilarity
> --------------------------------------------------------------------
>
>                 Key: TEXT-191
>                 URL: https://issues.apache.org/jira/browse/TEXT-191
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.9
>         Environment: Windows 10
> AdoptOpenJDK 11
>            Reporter: Alexander Foerster
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>              Labels: JaroWinkler, easyfix, newbie
>             Fix For: 1.10
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
>  
> The following two code snippets give the same output:
> {code:java}
> // checking similarity
> JaroWinklerSimilarity jws = new JaroWinklerSimilarity();
> System.out.println("SIMILARITY: " + jws.apply("foo", "foo") + "  " + jws.apply("foo", "bar"));
> // SIMILARITY: 1.0  0.0{code}
> {code:java}
> // checking distance
> JaroWinklerDistance jwd = new JaroWinklerDistance();
> System.out.println("DISTANCE: " + jwd.apply("foo", "foo") + "  " + jwd.apply("foo", "bar"));
> // DISTANCE: 1.0  0.0
> {code}
> I would expect the distance to be 1 - similarity, but as you can see distance and similarity return the same values.
>  
> An easy fix would be to use the commented lines in JaroWinklerDistance.java:
> {code:java}
> // JaroWinklerSimilarity similarity = new JaroWinklerSimilarity();
> // return 1 - similarity.apply(left, right);
> {code}
> and maybe make _similarity_ be a final property/variable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)