Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » analysis » ngram » [javadoc | source]
org.apache.lucene.analysis.ngram
public class: EdgeNGramTokenFilter [javadoc | source]
java.lang.Object
   org.apache.lucene.analysis.TokenStream
      org.apache.lucene.analysis.TokenFilter
         org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
Tokenizes the given token into n-grams of given size(s).
Nested Class Summary:
public static class  EdgeNGramTokenFilter.Side  Specifies which side of the input the n-gram should be generated from 
Field Summary
public static final  EdgeNGramTokenFilter.Side DEFAULT_SIDE     
public static final  int DEFAULT_MAX_GRAM_SIZE     
public static final  int DEFAULT_MIN_GRAM_SIZE     
Fields inherited from org.apache.lucene.analysis.TokenFilter:
input
Constructor:
 protected EdgeNGramTokenFilter(TokenStream input) 
 public EdgeNGramTokenFilter(TokenStream input,
    EdgeNGramTokenFilter.Side side,
    int minGram,
    int maxGram) 
    Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
    Parameters:
    input - TokenStream holding the input to be tokenized
    side - the Side from which to chop off an n-gram
    minGram - the smallest n-gram to generate
    maxGram - the largest n-gram to generate
 public EdgeNGramTokenFilter(TokenStream input,
    String sideLabel,
    int minGram,
    int maxGram) 
    Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
    Parameters:
    input - TokenStream holding the input to be tokenized
    sideLabel - the name of the Side from which to chop off an n-gram
    minGram - the smallest n-gram to generate
    maxGram - the largest n-gram to generate
Method from org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter Summary:
next
Methods from org.apache.lucene.analysis.TokenFilter:
close
Methods from org.apache.lucene.analysis.TokenStream:
close,   next,   next,   reset
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter Detail:
 public final Token next() throws IOException 
    Returns the next token in the stream, or null at EOS.