edu.umass.cs.mallet.base.pipe
Class SerialPipes
java.lang.Object
edu.umass.cs.mallet.base.pipe.Pipe
edu.umass.cs.mallet.base.pipe.SerialPipes
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- NEPipes
- public class SerialPipes
- extends Pipe
- implements java.io.Serializable
Convert an instance through a sequence of pipes.
- 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, wait, wait, wait |
SerialPipes
public SerialPipes()
SerialPipes
public SerialPipes(java.lang.Object[] pipes)
SerialPipes
public SerialPipes(Pipe[] pipes)
SerialPipes
public SerialPipes(java.util.List pipeList)
getPipes
public java.util.ArrayList getPipes()
isSuppressExceptions
public static boolean isSuppressExceptions()
setSuppressExceptions
public static void setSuppressExceptions(boolean suppressExceptions)
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
add
protected void add(Pipe pipe)
pipe
public Instance pipe(Instance carrier,
int startingIndex)
pipe
public Instance pipe(Instance carrier,
int startingIndex,
boolean growAlphabet)
removePipe
public void removePipe(int index)
replacePipe
public void replacePipe(int index,
Pipe p)
size
public int size()
getPipe
public Pipe getPipe(int index)
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.
toString
public java.lang.String toString()