Example usage for Java org.apache.lucene.analysis.shingle ShingleFilter fields, constructors, methods, implement or subclass
The text is from its open source code.
String | DEFAULT_FILLER_TOKEN filler token for when positionIncrement is more than 1 |
int | DEFAULT_MAX_SHINGLE_SIZE default maximum shingle size is 2. |
int | DEFAULT_MIN_SHINGLE_SIZE default minimum shingle size is 2. |
String | DEFAULT_TOKEN_TYPE default token type attribute value is "shingle" |
String | DEFAULT_TOKEN_SEPARATOR The default string to use when joining adjacent tokens to form a shingle |
ShingleFilter(TokenStream input, int minShingleSize, int maxShingleSize) Constructs a ShingleFilter with the specified shingle size from the TokenStream input | |
ShingleFilter(TokenStream input, int maxShingleSize) Constructs a ShingleFilter with the specified shingle size from the TokenStream input | |
ShingleFilter(TokenStream input, String tokenType) Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2 | |
ShingleFilter(TokenStream input) Construct a ShingleFilter with default shingle size: 2. |
void | close() NOTE: The default implementation chains the call to the input TokenStream, so be sure to call |
void | end() |
boolean | incrementToken() |
void | reset() |
void | setFillerToken(String fillerToken) Sets the string to insert for each position at which there is no token (i.e., when position increment is greater than one). |
void | setMaxShingleSize(int maxShingleSize) Set the max shingle size (default: 2) |
void | setOutputUnigrams(boolean outputUnigrams) Shall the output stream contain the input tokens (unigrams) as well as shingles? |
void | setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles) Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? |
void | setTokenSeparator(String tokenSeparator) Sets the string to use when joining adjacent tokens to form a shingle |