Package cc.mallet.pipe
Class BranchingPipe
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.BranchingPipe
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
@Deprecated public class BranchingPipe extends Pipe
Deprecated.A Pipe that works like a rule list. Evaluate predicate() on each Pipe in the array; the first one that returns true, call that one ("the called Pipe"), and ignore the remainder in the array. The called Pipe will then get control of the source InstanceIterator until it produces an Instance---in other words it will be able to call next() on the source Pipe as often as necessary to produce an Instance. You must be very careful that none of the iterators from Pipes in the rule list buffer any Instances---in other words they shouldn't call next() to pre-gather any Instances they they themselves don't consume and process immediately. Otherwise, Instances that should have been processed by some other constituent Pipe could get lost in this buffering process.- Author:
- Andrew McCallum
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BranchingPipe()
Deprecated.BranchingPipe(Pipe[] pipes)
Deprecated.BranchingPipe(java.util.Collection<Pipe> pipeList)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Iterator<Instance>
newIteratorFrom(java.util.Iterator<Instance> source)
Deprecated.Given an InstanceIterator, return a new InstanceIterator whose instances have also been processed by this pipe.-
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, pipe, preceedingPipeDataAlphabetNotification, preceedingPipeTargetAlphabetNotification, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
-
-
-
-
Method Detail
-
newIteratorFrom
public java.util.Iterator<Instance> newIteratorFrom(java.util.Iterator<Instance> source)
Deprecated.Description copied from class:Pipe
Given an InstanceIterator, return a new InstanceIterator whose instances have also been processed by this pipe. If you override this method, be sure to check and obey this pipe'sskipIfFalse(Instance)
method.- Overrides:
newIteratorFrom
in classPipe
-
-