edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors
Class FilteredBatchExExtractor<T>
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor<T>
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor<T>
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilteredBatchExExtractor
public FilteredBatchExExtractor()
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.