edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors
Class FilteredBatchExExtractor<T>

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor<T>
      extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor<T>
          extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.FilteredBatchExExtractor<T>
Type Parameters:
T - The type of example.
All Implemented Interfaces:
LBJ2.parse.Parser
Direct Known Subclasses:
DocFilteredBatchExEx

public abstract class FilteredBatchExExtractor<T>
extends BatchExExtractor<T>

Extracts examples with a facility for getting all examples in batch and filtering examples. next() and getExamples() will return filtered mentions.

Author:
Eric Bengtson

Constructor Summary
FilteredBatchExExtractor()
           
 
Method Summary
protected abstract  boolean doFiltersAccept(T ex)
          Implement this method to define the filter outputs.
 java.util.List<T> getExamples()
          Get the examples.
protected  java.util.List<T> getFilterAccepted(java.util.List<T> xes)
          Get a list of examples accepted by the filter out of the given list.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor
generateAllExamples, getNextCached, next, recordEquivalence, reset
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor
close, enqueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredBatchExExtractor

public FilteredBatchExExtractor()
Method Detail

doFiltersAccept

protected abstract boolean doFiltersAccept(T ex)
Implement this method to define the filter outputs.

Parameters:
ex - The example.
Returns:
Whether the example is accepted by the filters.

getFilterAccepted

protected java.util.List<T> getFilterAccepted(java.util.List<T> xes)
Get a list of examples accepted by the filter out of the given list.

Parameters:
xes - A list of examples.
Returns:
A list of filter-accepted examples from among given examples.

getExamples

public java.util.List<T> getExamples()
Get the examples.

Overrides:
getExamples in class BatchExExtractor<T>
Returns:
the examples that next() will return, which are filtered.