@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(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 IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOException - is thrown when an IOException occurspublic void clear()
throws IOException
IOException - thrown if there is an error reseting the tokenizerpublic int hashCode()
hashCode in class org.apache.lucene.util.AttributeSourcepublic boolean equals(Object obj)
equals in class org.apache.lucene.util.AttributeSourceCopyright © 2012–2020 OWASP. All rights reserved.