edu.mayo.informatics.indexer.lucene.filters
Class CharRemovingFilter
java.lang.Object
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
edu.mayo.informatics.indexer.lucene.filters.CharRemovingFilter
public class CharRemovingFilter
- extends org.apache.lucene.analysis.TokenFilter
Filter which removes specified characters from terms. Useful for removing
punctuation, etc.
- Author:
- Dan Armbrust
Fields inherited from class org.apache.lucene.analysis.TokenFilter |
input |
Constructor Summary |
CharRemovingFilter(org.apache.lucene.analysis.TokenStream in,
java.util.Set charsToRemove)
|
Method Summary |
static java.util.Set |
makeCharRemovalSet(char[] charsToRemove)
Builds a Set from an array of chars to remove, appropriate for passing
into the CharRemovingFilter constructor. |
org.apache.lucene.analysis.Token |
next()
|
Methods inherited from class org.apache.lucene.analysis.TokenFilter |
close, reset |
Methods inherited from class org.apache.lucene.analysis.TokenStream |
next |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharRemovingFilter
public CharRemovingFilter(org.apache.lucene.analysis.TokenStream in,
java.util.Set charsToRemove)
makeCharRemovalSet
public static final java.util.Set makeCharRemovalSet(char[] charsToRemove)
- Builds a Set from an array of chars to remove, appropriate for passing
into the CharRemovingFilter constructor.
next
public org.apache.lucene.analysis.Token next()
throws java.io.IOException
- Overrides:
next
in class org.apache.lucene.analysis.TokenStream
- Throws:
java.io.IOException