You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2009/03/21 22:30:55 UTC

[jira] Commented: (LUCENE-1550) Add N-Gram String Matching for Spell Checking

    [ https://issues.apache.org/jira/browse/LUCENE-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688079#action_12688079 ] 

Grant Ingersoll commented on LUCENE-1550:
-----------------------------------------

Hey Tom,

Few questions:

# Do you have recommendations on picking n?
# On line 78 or so, can't that be moved up?  s1/t1 are calculated on line 47 and not assigned to.  Seems like it would be an optimization to return out if they are 0.  Also, can it just be:
{code}
if (s1 == 0 || t1 == 0){return 1;};
{code}
In fact, all tests still pass when this is moved up to the top.  However, I must not be understanding something, as why should:
{code}
public void testEmpty() throws Exception {
    StringDistance nsd = new NGramDistance(1);
    float d = nsd.getDistance("", "al");
    assertEquals(d,1.0f,0.001);
  }
{code}
pass?


> Add N-Gram String Matching for Spell Checking
> ---------------------------------------------
>
>                 Key: LUCENE-1550
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1550
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: contrib/spellchecker
>    Affects Versions: 2.9
>            Reporter: Thomas Morton
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1550.patch
>
>
> N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance". Proceedings of the Twelfth International Conference on String Processing and Information Retrieval (SPIRE 2005), pp. 115-126,  Buenos Aires, Argentina, November 2005. 
> http://www.cs.ualberta.ca/~kondrak/papers/spire05.pdf

-- 
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