Package cc.mallet.pipe
Class SerialPipes
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.SerialPipes
-
- All Implemented Interfaces:
AlphabetCarrying,java.io.Serializable
- Direct Known Subclasses:
NEPipes
public class SerialPipes extends Pipe implements java.io.Serializable
Convert an instance through a sequence of pipes.- Author:
- Andrew McCallum mccallum@cs.umass.edu
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSerialPipes.Predicate
-
Constructor Summary
Constructors Constructor Description SerialPipes()SerialPipes(Pipe[] pipes)SerialPipes(java.util.Collection<Pipe> pipeList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PipegetPipe(int index)java.util.Iterator<Instance>newIteratorFrom(java.util.Iterator<Instance> source)Given an InstanceIterator, return a new InstanceIterator whose instances have also been processed by this pipe.SerialPipesnewSerialPipesFromRange(int start, int end)SerialPipesnewSerialPipesFromSuffix(SerialPipes.Predicate testForStartingNewPipes)java.util.ArrayList<Pipe>pipes()Allows access to the underlying collection of Pipes.voidsetTargetProcessing(boolean lookForAndProcessTarget)Set whether input is taken from target field of instance during processing.intsize()java.lang.StringtoString()-
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
-
-
-
-
Method Detail
-
newSerialPipesFromSuffix
public SerialPipes newSerialPipesFromSuffix(SerialPipes.Predicate testForStartingNewPipes)
-
newSerialPipesFromRange
public SerialPipes newSerialPipesFromRange(int start, int end)
-
setTargetProcessing
public void setTargetProcessing(boolean lookForAndProcessTarget)
Description copied from class:PipeSet whether input is taken from target field of instance during processing. If argument is false, don't expect to find input material for the target. By default, this is true.- Overrides:
setTargetProcessingin classPipe
-
newIteratorFrom
public java.util.Iterator<Instance> newIteratorFrom(java.util.Iterator<Instance> source)
Description copied from class:PipeGiven 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:
newIteratorFromin classPipe
-
size
public int size()
-
getPipe
public Pipe getPipe(int index)
-
pipes
public java.util.ArrayList<Pipe> pipes()
Allows access to the underlying collection of Pipes. Use with caution.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-