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 class
SerialPipes.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 Pipe
getPipe(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.SerialPipes
newSerialPipesFromRange(int start, int end)
SerialPipes
newSerialPipesFromSuffix(SerialPipes.Predicate testForStartingNewPipes)
java.util.ArrayList<Pipe>
pipes()
Allows access to the underlying collection of Pipes.void
setTargetProcessing(boolean lookForAndProcessTarget)
Set whether input is taken from target field of instance during processing.int
size()
java.lang.String
toString()
-
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:Pipe
Set 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:
setTargetProcessing
in classPipe
-
newIteratorFrom
public java.util.Iterator<Instance> newIteratorFrom(java.util.Iterator<Instance> source)
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
-
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:
toString
in classjava.lang.Object
-
-