public class CRFDatum<FEAT,LAB>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
CRFDatum(java.util.List<FEAT> features,
LAB label,
java.util.List<double[]> featureVals)
Constructs a new BasicDatum with the given features and label.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<FEAT> |
asFeatures()
Returns the collection that this BasicDatum was constructed with.
|
java.util.List<double[]> |
asFeatureVals()
Returns the double array containing the feature values.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
toString()
Returns a String representation of this BasicDatum (lists features and labels).
|
public java.util.List<FEAT> asFeatures()
public java.util.List<double[]> asFeatureVals()
asFeatures()
public LAB label()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object to test equality withpublic int hashCode()
hashCode
in class java.lang.Object