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

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

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

Filter that eliminates terms that are too much or not enough frequent.


Constructor Summary
MergePreprocessedData.FrequencyFilter(int minFreq, int maxFreq)
          Creates a new frequency filter.
 
Method Summary
 boolean accept(MutableString term, 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.FrequencyFilter

public MergePreprocessedData.FrequencyFilter(int minFreq,
                                             int maxFreq)
Creates a new frequency filter.

Parameters:
minFreq - the minimum frequency of an accepted term (inclusive).
maxFreq - the maximum frequency of an accepted term (exclusive).
Method Detail

accept

public boolean accept(MutableString term,
                      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:
term - the term.
frequency - the frequency of term.