public final class ElisionFilter extends TokenFilter
TokenStream
. For example, "l'avion" (the plane) will be
tokenized as "avion" (plane).AttributeSource.State
Modifier and Type | Field and Description |
---|---|
private CharArraySet |
articles |
private CharTermAttribute |
termAtt |
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
ElisionFilter(TokenStream input,
CharArraySet articles)
Constructs an elision filter with a Set of stop words
|
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken()
Increments the
TokenStream with a CharTermAttribute without elisioned start |
close, end, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
private final CharArraySet articles
private final CharTermAttribute termAtt
public ElisionFilter(TokenStream input, CharArraySet articles)
input
- the source TokenStream
articles
- a set of stopword articlespublic final boolean incrementToken() throws java.io.IOException
TokenStream
with a CharTermAttribute
without elisioned startincrementToken
in class TokenStream
java.io.IOException