com.googlecode.whatswrong
Class FilterPipeline
java.lang.Object
com.googlecode.whatswrong.FilterPipeline
- All Implemented Interfaces:
- NLPInstanceFilter
public class FilterPipeline
- extends Object
- implements NLPInstanceFilter
A FilterPipeline filters an NLPInstance by iteratively calling a sequence of delegate filters.
- Author:
- Sebastian Riedel
|
Method Summary |
NLPInstance |
filter(NLPInstance original)
Applies the 1st filter to the original instance, the 2nd filter to the result of the 1st filter, and so on. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterPipeline
public FilterPipeline(NLPInstanceFilter... filters)
- Creates a new filter pipeline with the given filters.
- Parameters:
filters - the filters of the pipeline. The first filter will be applied first, the last filter last.
filter
public NLPInstance filter(NLPInstance original)
- Applies the 1st filter to the original instance, the 2nd filter to the result of the 1st filter, and so on.
- Specified by:
filter in interface NLPInstanceFilter
- Parameters:
original - the original instance.
- Returns:
- the result of the last filter applied to the previous result.
- See Also:
NLPInstanceFilter.filter(NLPInstance)
Copyright © 2013. All Rights Reserved.