|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.ling.RVFDatum
public class RVFDatum
Basic implementation of Datum interface that can be constructed with a Collection of features and one more more labels. The features must be specified at construction, but the labels can be set and/or changed later.
Constructor Summary | |
---|---|
RVFDatum()
Constructs a new RVFDatum with no features or labels. |
|
RVFDatum(Counter features)
Constructs a new RVFDatum with the given features and no labels. |
|
RVFDatum(Counter features,
Object label)
Constructs a new RVFDatum with the given features and label. |
|
RVFDatum(Datum m)
Constructs a new RVFDatum taking the data from a Datum |
Method Summary | |
---|---|
Collection |
asFeatures()
Returns the list of features without values |
Counter |
asFeaturesCounter()
Returns the Counter of features and values |
boolean |
equals(Object o)
Returns whether the given Datum contains the same features as this Datum. |
Object |
label()
Returns the primary label for this Object, or null if none have been set. |
Collection |
labels()
Returns the complete list of labels for this Object, which may be empty. |
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 |
---|
public RVFDatum(Counter features, Object label)
public RVFDatum(Datum m)
m
- public RVFDatum(Counter features)
public RVFDatum()
Method Detail |
---|
public Counter asFeaturesCounter()
public Collection asFeatures()
asFeatures
in interface Featurizable
public void setLabel(Object label)
public String toString()
toString
in class Object
public Object label()
Labeled
label
in interface Labeled
public Collection labels()
Labeled
labels
in interface Labeled
public boolean equals(Object o)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |