|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.lth.cs.nlp.nlputils.ml.FeatureList
public class FeatureList
A list of feature values.
Field Summary | |
---|---|
FeatureDeclaration |
decl
The feature declaration that is used by this feature list. |
String[] |
features
The array of feature values. |
Constructor Summary | |
---|---|
FeatureList(FeatureDeclaration decl)
Creates a new feature list given a declaration. |
|
FeatureList(FeatureDeclaration decl,
String[] features)
Creates a new feature list given a declaration, using the given array as storage. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getFeature(int index)
Gets the value of a feature given by index. |
String |
getFeature(String featureName)
Gets the value of a feature given by name. |
int |
hashCode()
|
void |
setFeature(int featureIndex,
String value)
Sets the value of a feature given by index. |
void |
setFeature(String featureName,
String value)
Sets the value of a feature given by name. |
String |
toString()
|
String |
toTrainingString()
Returns a string that can be used to create training sets with the NumericEncoding. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public FeatureDeclaration decl
public String[] features
Constructor Detail |
---|
public FeatureList(FeatureDeclaration decl)
decl
- the declaration to use.public FeatureList(FeatureDeclaration decl, String[] features)
decl
- the declaration to use.features
- the array to use as storage.Method Detail |
---|
public void setFeature(String featureName, String value)
featureName
- the name of the feature.value
- the value of the feature.public void setFeature(int featureIndex, String value)
featureIndex
- the index of the feature.value
- the value of the feature.public String getFeature(String featureName)
featureName
- the name of the feature.
public String getFeature(int index)
index
- the index of the feature.
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
public String toTrainingString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |