public class ISOLatin1AccentFilter
extends org.apache.lucene.analysis.TokenFilter
For instance, 'à' will be replaced by 'a'.
When indexing, acts like a synonym filter and return two tokens: the
original accented token and the new unaccented one.
Otherwise, only return the unaccented token.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isIndexing |
static java.lang.String |
REVISION |
static java.lang.String |
TOKEN_TYPE_UNACCENTED |
protected org.apache.lucene.analysis.Token |
unaccentedToken |
Constructor and Description |
---|
ISOLatin1AccentFilter(org.apache.lucene.analysis.TokenStream input,
boolean isIndexing) |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.analysis.Token |
next() |
static java.lang.String |
removeAccents(java.lang.String input)
To replace accented characters in a String by unaccented equivalents.
|
getOnlyUseNewAPI, incrementToken, next, setOnlyUseNewAPI
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString
public static final java.lang.String REVISION
public static final java.lang.String TOKEN_TYPE_UNACCENTED
protected final boolean isIndexing
protected org.apache.lucene.analysis.Token unaccentedToken
public ISOLatin1AccentFilter(org.apache.lucene.analysis.TokenStream input, boolean isIndexing)
input
- the TokenStream to filterisIndexing
- whether this filter is used during indexing or searchpublic final org.apache.lucene.analysis.Token next() throws java.io.IOException
next
in class org.apache.lucene.analysis.TokenStream
java.io.IOException
public static final java.lang.String removeAccents(java.lang.String input)
input
- the string to processCopyright © 2001-2010 Jalios SA. All Rights Reserved.