You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steven Rowe (JIRA)" <ji...@apache.org> on 2008/01/13 06:37:34 UTC
[jira] Commented: (LUCENE-400) NGramFilter -- construct n-grams
from a TokenStream
[ https://issues.apache.org/jira/browse/LUCENE-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558350#action_12558350 ]
Steven Rowe commented on LUCENE-400:
------------------------------------
Lucene has *character* NGram support, but not *word* NGram support, which this filter supplies:
bq. This filter constructs n-grams (token combinations up to a fixed size, sometimes called "shingles") from a token stream.
> NGramFilter -- construct n-grams from a TokenStream
> ---------------------------------------------------
>
> Key: LUCENE-400
> URL: https://issues.apache.org/jira/browse/LUCENE-400
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Analysis
> Affects Versions: unspecified
> Environment: Operating System: All
> Platform: All
> Reporter: Sebastian Kirsch
> Priority: Minor
> Attachments: NGramAnalyzerWrapper.java, NGramAnalyzerWrapperTest.java, NGramFilter.java, NGramFilterTest.java
>
>
> This filter constructs n-grams (token combinations up to a fixed size, sometimes
> called "shingles") from a token stream.
> The filter sets start offsets, end offsets and position increments, so
> highlighting and phrase queries should work.
> Position increments > 1 in the input stream are replaced by filler tokens
> (tokens with termText "_" and endOffset - startOffset = 0) in the output
> n-grams. (Position increments > 1 in the input stream are usually caused by
> removing some tokens, eg. stopwords, from a stream.)
> The filter uses CircularFifoBuffer and UnboundedFifoBuffer from Apache
> Commons-Collections.
> Filter, test case and an analyzer are attached.
--
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