You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Thomas Morton (JIRA)" <ji...@apache.org> on 2009/02/26 03:19:04 UTC

[jira] Created: (LUCENE-1548) LevenshteinDistance code normalization is incorrect

LevenshteinDistance code normalization is incorrect
---------------------------------------------------

                 Key: LUCENE-1548
                 URL: https://issues.apache.org/jira/browse/LUCENE-1548
             Project: Lucene - Java
          Issue Type: Bug
          Components: contrib/spellchecker
    Affects Versions: 2.4, 2.3.2, 2.3.1, 2.3
            Reporter: Thomas Morton
            Priority: Minor
             Fix For: 2.4.1


The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum.  Otherwise negative distances are possible.  The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-1548) LevenshteinDistance code normalization is incorrect

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless reassigned LUCENE-1548:
------------------------------------------

    Assignee: Michael McCandless

> LevenshteinDistance code normalization is incorrect
> ---------------------------------------------------
>
>                 Key: LUCENE-1548
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1548
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spellchecker
>    Affects Versions: 2.3, 2.3.1, 2.3.2, 2.4
>            Reporter: Thomas Morton
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4.1
>
>         Attachments: LUCENE-1548.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum.  Otherwise negative distances are possible.  The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1548) LevenshteinDistance code normalization is incorrect

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1548.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9

Thanks Thomas!

> LevenshteinDistance code normalization is incorrect
> ---------------------------------------------------
>
>                 Key: LUCENE-1548
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1548
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spellchecker
>    Affects Versions: 2.3, 2.3.1, 2.3.2, 2.4
>            Reporter: Thomas Morton
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4.1, 2.9
>
>         Attachments: LUCENE-1548.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum.  Otherwise negative distances are possible.  The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1548) LevenshteinDistance code normalization is incorrect

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677373#action_12677373 ] 

Michael McCandless commented on LUCENE-1548:
--------------------------------------------

Looks good, I'll commit.  Thanks Thomas!

> LevenshteinDistance code normalization is incorrect
> ---------------------------------------------------
>
>                 Key: LUCENE-1548
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1548
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spellchecker
>    Affects Versions: 2.3, 2.3.1, 2.3.2, 2.4
>            Reporter: Thomas Morton
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4.1
>
>         Attachments: LUCENE-1548.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum.  Otherwise negative distances are possible.  The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1548) LevenshteinDistance code normalization is incorrect

Posted by "Thomas Morton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Morton updated LUCENE-1548:
----------------------------------

    Attachment: LUCENE-1548.patch

Fixes issue (changes min to max in distance computation) and corrects unit tests.

> LevenshteinDistance code normalization is incorrect
> ---------------------------------------------------
>
>                 Key: LUCENE-1548
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1548
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/spellchecker
>    Affects Versions: 2.3, 2.3.1, 2.3.2, 2.4
>            Reporter: Thomas Morton
>            Priority: Minor
>             Fix For: 2.4.1
>
>         Attachments: LUCENE-1548.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The normalization of the edit distance should use the maximum of the two string being compared instead of the minimum.  Otherwise negative distances are possible.  The spell checker filters out edits below a certain threshold so this hasn't been a problem in practice.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org