it.unimi.dsi.archive4j.tool
Class MergePreprocessedData.StopwordFilter

java.lang.Object
  extended by it.unimi.dsi.archive4j.tool.MergePreprocessedData.StopwordFilter
All Implemented Interfaces:
MergePreprocessedData.TermFilter
Enclosing class:
MergePreprocessedData

public static class MergePreprocessedData.StopwordFilter
extends Object
implements MergePreprocessedData.TermFilter

Filter that eliminates terms in a given set.


Constructor Summary
MergePreprocessedData.StopwordFilter(Iterable<? extends CharSequence> terms)
          Creates a new filter using a given iterable object of terms.
 
Method Summary
 boolean accept(MutableString word, int frequency)
          Returns true if the given term must be accepted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergePreprocessedData.StopwordFilter

public MergePreprocessedData.StopwordFilter(Iterable<? extends CharSequence> terms)
Creates a new filter using a given iterable object of terms.

Parameters:
terms - an iterable object; the returned terms will be copied into MutableString instances.
Method Detail

accept

public boolean accept(MutableString word,
                      int frequency)
Description copied from interface: MergePreprocessedData.TermFilter
Returns true if the given term must be accepted.

Specified by:
accept in interface MergePreprocessedData.TermFilter
Parameters:
word - the term.
frequency - the frequency of term.