@NotThreadSafe
public final class TokenPairConcatenatingFilter
extends org.apache.lucene.analysis.TokenFilter
Takes a TokenStream and adds additional tokens by concatenating pairs of words.
Example: "Spring Framework Core" -> "Spring SpringFramework Framework FrameworkCore Core".
| Constructor and Description |
|---|
TokenPairConcatenatingFilter(org.apache.lucene.analysis.TokenStream stream)
Constructs a new TokenPairConcatenatingFilter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets the filter.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
incrementToken()
Increments the underlying TokenStream and sets CharTermAttributes to
construct an expanded set of tokens by concatenating tokens with the
previous token.
|
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, reflectAsString, reflectWith, removeAllAttributes, restoreState, toStringpublic TokenPairConcatenatingFilter(org.apache.lucene.analysis.TokenStream stream)
stream - the TokenStream that this filter will processpublic boolean incrementToken()
throws java.io.IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamjava.io.IOException - is thrown when an IOException occurspublic void clear()
throws java.io.IOException
java.io.IOException - thrown if there is an error reseting the tokenizerpublic int hashCode()
hashCode in class org.apache.lucene.util.AttributeSourcepublic boolean equals(java.lang.Object obj)
equals in class org.apache.lucene.util.AttributeSourceCopyright© 2012-21 Jeremy Long. All Rights Reserved.