lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wettin (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-1306) CombinedNGramTokenFilter
Date Sat, 21 Jun 2008 21:35:45 GMT

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

Karl Wettin updated LUCENE-1306:
--------------------------------

    Attachment: LUCENE-1306.txt

New in this patch:
 * offsets as in NGramTokenFilter
 * token type "^gram", "gram$", "^gram$" and "gram"
 * a bit of javadocs

There is also a todo I'll have to look in to some other day.

{code:java}
//  todo
//  /**
//   * if true, prefix and suffix does not count as a part of the ngram size.
//   * E.g. '^he' has as n of 2 if true and 3 if false
//   */
//  private boolean usingBoundaryCharsPartOfN = true;
{code}

This was not quite as simple to add as I hoped it would be and will try to find some time
to fix that before I commit it.


> CombinedNGramTokenFilter
> ------------------------
>
>                 Key: LUCENE-1306
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1306
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: contrib/analyzers
>            Reporter: Karl Wettin
>            Assignee: Karl Wettin
>            Priority: Trivial
>         Attachments: LUCENE-1306.txt, LUCENE-1306.txt
>
>
> Alternative NGram filter that produce tokens with composite prefix and suffix markers.
> {code:java}
> ts = new WhitespaceTokenizer(new StringReader("hello"));
> ts = new CombinedNGramTokenFilter(ts, 2, 2);
> assertNext(ts, "^h");
> assertNext(ts, "he");
> assertNext(ts, "el");
> assertNext(ts, "ll");
> assertNext(ts, "lo");
> assertNext(ts, "o$");
> assertNull(ts.next());
> {code}

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


Mime
View raw message