anl.aida.ae.lucene
Class StopWordFilter

java.lang.Object
  extended by anl.aida.ae.lucene.StopWordFilter
All Implemented Interfaces:
Filter<org.apache.lucene.index.Term>

public class StopWordFilter
extends java.lang.Object
implements Filter<org.apache.lucene.index.Term>

Terms filter that filters out a predefined list of stop words.


Field Summary
private  java.util.Set<java.lang.String> stopSet
           
private  java.lang.String[] stopWords
           
 
Constructor Summary
StopWordFilter()
           
 
Method Summary
 boolean evaluate(org.apache.lucene.index.Term item)
          Evaluates the term against the set of stop words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stopSet

private java.util.Set<java.lang.String> stopSet

stopWords

private java.lang.String[] stopWords
Constructor Detail

StopWordFilter

public StopWordFilter()
Method Detail

evaluate

public boolean evaluate(org.apache.lucene.index.Term item)
Evaluates the term against the set of stop words.

Specified by:
evaluate in interface Filter<org.apache.lucene.index.Term>
Parameters:
item - the item to evaluate
Returns:
true if the item passes the filter, otherwise false.