public final class PhoneticFilter extends TokenFilter
AttributeSource.State
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.codec.Encoder |
encoder
phonetic encoder
|
protected boolean |
inject
true if encoded tokens should be added as synonyms
|
protected AttributeSource.State |
save
captured state, non-null when
inject=true and a token is buffered |
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
PhoneticFilter(TokenStream in,
org.apache.commons.codec.Encoder encoder,
boolean inject)
Creates a PhoneticFilter with the specified encoder, and either
adding encoded forms as synonyms (
inject=true ) or
replacing them. |
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken() |
void |
reset() |
close, end
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
protected boolean inject
protected org.apache.commons.codec.Encoder encoder
protected AttributeSource.State save
inject=true
and a token is bufferedpublic PhoneticFilter(TokenStream in, org.apache.commons.codec.Encoder encoder, boolean inject)
inject=true
) or
replacing them.public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public void reset() throws IOException
reset
in class TokenFilter
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.