|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.ml.seqmodel.feature.BasicFeature
Basic data structure for feature data
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Constructor Summary | |
BasicFeature()
|
|
BasicFeature(BasicFeature f)
|
|
BasicFeature(FeatureIdentifier id,
int label,
double val)
|
|
BasicFeature(FeatureIdentifier id,
int prevLabel,
int label,
double val)
|
|
BasicFeature(java.lang.String id,
int label,
double val)
|
|
BasicFeature(java.lang.String id,
int prevLabel,
int label,
double val)
|
|
| Method Summary | |
Feature |
copy()
Gets a copy of the current feature |
void |
copyFrom(BasicFeature f)
|
FeatureIdentifier |
getID()
One can quickly find out the index of the current feature according to its unique identifier |
int |
getIndex()
The index of this feature from 0..numFeatures-1. |
int |
getLabel()
has to be a label index from 0..numLabels-1 |
int |
getPrevLabel()
can be -1 if the feature is a state rather than an edge feature |
double |
getValue()
|
void |
setID(FeatureIdentifier id)
Sets the identitifer |
void |
setIndex(int index)
Sets the index of the feature |
void |
setLabel(int label)
Sets the label of the current feature |
void |
setPrevLabel(int prevLabel)
Sets the label of the starting state of an edge feature if the current feature is an edge feature. |
void |
setValue(double val)
Sets the value to the feature |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BasicFeature()
public BasicFeature(java.lang.String id,
int label,
double val)
public BasicFeature(FeatureIdentifier id,
int label,
double val)
public BasicFeature(java.lang.String id,
int prevLabel,
int label,
double val)
public BasicFeature(FeatureIdentifier id,
int prevLabel,
int label,
double val)
public BasicFeature(BasicFeature f)
| Method Detail |
public void copyFrom(BasicFeature f)
public Feature copy()
Feature
copy in interface Featurepublic int getIndex()
Feature
getIndex in interface Featurepublic void setIndex(int index)
Feature
setIndex in interface Featureindex - the index of the featurepublic int getLabel()
Feature
getLabel in interface Featurepublic void setLabel(int label)
Feature
setLabel in interface Featurelabel - the label of the featurepublic int getPrevLabel()
Feature
getPrevLabel in interface Featurepublic void setPrevLabel(int prevLabel)
Feature
setPrevLabel in interface FeatureprevLabel - the label of the starting state of an edge featurepublic double getValue()
getValue in interface Featurepublic void setValue(double val)
Feature
setValue in interface Featureval - the value of the featurepublic java.lang.String toString()
toString in class java.lang.Objectpublic FeatureIdentifier getID()
Feature
getID in interface Featurepublic void setID(FeatureIdentifier id)
Feature
setID in interface Featureid - the feature identifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||