edu.mayo.informatics.indexer.lucene.filters
Class CharRemovingFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by 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

Field Summary
 
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
 

Constructor Detail

CharRemovingFilter

public CharRemovingFilter(org.apache.lucene.analysis.TokenStream in,
                          java.util.Set charsToRemove)
Method Detail

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

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.