|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.ie.crf.CRFDatum<FEAT,LAB>
public class CRFDatum<FEAT,LAB>
The representation of Datums used internally in CRFClassifier.
Constructor Summary | |
---|---|
CRFDatum(List<FEAT> features)
Constructs a new BasicDatum with the given features and no labels. |
|
CRFDatum(List<FEAT> features,
LAB label)
Constructs a new BasicDatum with the given features and label. |
Method Summary | |
---|---|
List<FEAT> |
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. |
int |
hashCode()
|
LAB |
label()
Returns the label for this Datum, or null if none have been set. |
void |
setLabel(LAB 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, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CRFDatum(List<FEAT> features, LAB label)
features
- The features of the CRFDatumlabel
- The label of the CRFDatumpublic CRFDatum(List<FEAT> features)
features
- The features of the CRFDatumMethod Detail |
---|
public List<FEAT> asFeatures()
public LAB label()
public void setLabel(LAB label)
label
- New label for CRFDatumpublic String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- The object to test equality with
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |