edu.umass.cs.mallet.base.pipe
Class IteratingPipe
java.lang.Object
edu.umass.cs.mallet.base.pipe.Pipe
edu.umass.cs.mallet.base.pipe.IteratingPipe
- All Implemented Interfaces:
- java.io.Serializable
- public class IteratingPipe
- extends Pipe
- implements java.io.Serializable
Converts the iterator in the data field to a PipeOutputAccumulation of the values
spanned by the iterator.
- See Also:
- Serialized Form
Methods inherited from class edu.umass.cs.mallet.base.pipe.Pipe |
getDataAlphabet, getInstanceId, getParent, getParentRoot, getTargetAlphabet, isDataAlphabetSet, isTargetProcessing, pipe, readResolve, setDataAlphabet, setParent, setTargetAlphabet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IteratingPipe
public IteratingPipe(PipeOutputAccumulator accumulator,
Pipe iteratedPipe)
IteratingPipe
public IteratingPipe(Pipe iteratedPipe)
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 class Pipe
resolveDataAlphabet
protected Alphabet resolveDataAlphabet()
- Overrides:
resolveDataAlphabet
in class Pipe
resolveTargetAlphabet
protected Alphabet resolveTargetAlphabet()
- Overrides:
resolveTargetAlphabet
in class Pipe
pipe
public Instance pipe(Instance carrier)
- Description copied from class:
Pipe
- Process an Instance. This method takes an input Instance,
destructively modifies it in some way, and returns it.
This is the method by which all pipes are eventually run.
One can create a new concrete subclass of Pipe simply by
implementing this method.
- Specified by:
pipe
in class Pipe
- Parameters:
carrier
- Instance to be processed.
iteratePipe
public static PipeOutputAccumulator iteratePipe(Pipe iteratedPipe,
PipeOutputAccumulator accumulator,
Instance carrier)