cc.mallet.pipe
Class TargetRememberLastLabel

java.lang.Object
  extended by cc.mallet.pipe.Pipe
      extended by cc.mallet.pipe.TargetRememberLastLabel
All Implemented Interfaces:
AlphabetCarrying, java.io.Serializable

public class TargetRememberLastLabel
extends Pipe

For each position in the target, remember the last non-background label. Assumes that the target of piped instances is a LabelSequence. Replaces the target with a LabelsSequence where row 0 is the original labels, and row 1 is the last label.

Version:
$Id: TargetRememberLastLabel.java,v 1.1 2007/10/22 21:37:39 mccallum Exp $
Author:
Charles Sutton
See Also:
Serialized Form

Constructor Summary
TargetRememberLastLabel()
           
TargetRememberLastLabel(java.lang.String backgroundLabel, boolean offset)
          offset determines how the memory and base sequences will be aligned.
 
Method Summary
 Instance pipe(Instance carrier)
          Really this should be 'protected', but isn't for historical reasons.
 
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, newIteratorFrom, preceedingPipeDataAlphabetNotification, preceedingPipeTargetAlphabetNotification, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetRememberLastLabel

public TargetRememberLastLabel()

TargetRememberLastLabel

public TargetRememberLastLabel(java.lang.String backgroundLabel,
                               boolean offset)
offset determines how the memory and base sequences will be aligned. If true, they'll be aligned like this:
  MEM   O  O  S  S  S  E  L
  BASE  O  S  S  O  E  L  O
 
otherwise, they'll be aligned like this:
  MEM   O  S  S  S  E  E  L
  BASE  O  S  S  O  E  L  O
 

Method Detail

pipe

public Instance pipe(Instance carrier)
Description copied from class: Pipe
Really this should be 'protected', but isn't for historical reasons.

Overrides:
pipe in class Pipe