edu.stanford.nlp.ie.crf
Class CRFDatum

java.lang.Object
  extended by edu.stanford.nlp.ie.crf.CRFDatum
All Implemented Interfaces:
Serializable

public class CRFDatum
extends Object
implements Serializable

Author:
Jenny Finkel
See Also:
Serialized Form

Constructor Summary
CRFDatum(List features)
          Constructs a new BasicDatum with the given features and no labels.
CRFDatum(List features, Object label)
           
 
Method Summary
 List asFeatures()
          Returns the collection that this BasicDatum was constructed with.
 boolean equals(Object o)
          Returns whether the given Datum contains the same features as this Datum.
 Object label()
          Returns the label for this Datum, or null if none have been set.
 void setLabel(Object label)
          Removes all currently assigned Labels for this Datum then adds the given Label.
 String toString()
          Returns a String representation of this BasicDatum (lists features and labels).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CRFDatum

public CRFDatum(List features,
                Object label)

CRFDatum

public CRFDatum(List features)
Constructs a new BasicDatum with the given features and no labels.

Method Detail

asFeatures

public List asFeatures()
Returns the collection that this BasicDatum was constructed with.


label

public Object label()
Returns the label for this Datum, or null if none have been set.


setLabel

public void setLabel(Object label)
Removes all currently assigned Labels for this Datum then adds the given Label. Calling setLabel(null) effectively clears all labels.


toString

public String toString()
Returns a String representation of this BasicDatum (lists features and labels).

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns whether the given Datum contains the same features as this Datum. Doesn't check the labels, should we change this?

Overrides:
equals in class Object


Stanford NLP Group