|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.parser.guide.instance.FeatureDivideModel
public class FeatureDivideModel
The feature divide model is used for divide the training instances into several models according to a divide feature. Usually this strategy decrease the training and classification time, but can also decrease the accuracy of the parser.
Constructor Summary | |
---|---|
FeatureDivideModel(FeatureVector features,
Model parent)
Constructs a feature divide model. |
Method Summary | |
---|---|
void |
addInstance(SingleDecision decision)
|
void |
decreaseFrequency()
|
FeatureVector |
extract()
|
void |
finalizeSentence(DependencyStructure dependencyGraph)
|
FeatureVector |
getDivideFeatureVector()
Returns the divide feature vector |
int |
getFrequency()
Returns the frequency (number of instances) |
ClassifierGuide |
getGuide()
|
FeatureVector |
getMasterFeatureVector()
Returns the "sum-up" or master feature vector |
String |
getModelName()
|
Model |
getParent()
Returns the parent model |
void |
increaseFrequency()
Increase the frequency by 1 |
protected void |
initSplitParam(FeatureVector featureVector)
Initialize the feature split parameters and the split feature vector and master feature vector according to the behavior strategy. |
protected void |
load()
Loads the feature divide model settings .fsm file. |
void |
noMoreInstances()
|
boolean |
predict(SingleDecision decision)
|
FeatureVector |
predictExtract(SingleDecision decision)
|
protected void |
save()
Saves the feature divide model settings .fsm file. |
protected void |
setFrequency(int frequency)
Sets the frequency (number of instances) |
protected void |
setParent(Model parent)
Sets the parent model |
void |
terminate()
|
String |
toString()
|
void |
train()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeatureDivideModel(FeatureVector features, Model parent) throws MaltChainedException
features
- the feature vector used by the atomic model.parent
- the parent guide model.
MaltChainedException
Method Detail |
---|
public void addInstance(SingleDecision decision) throws MaltChainedException
addInstance
in interface InstanceModel
MaltChainedException
public void noMoreInstances() throws MaltChainedException
noMoreInstances
in interface Model
MaltChainedException
public void finalizeSentence(DependencyStructure dependencyGraph) throws MaltChainedException
finalizeSentence
in interface Model
MaltChainedException
public boolean predict(SingleDecision decision) throws MaltChainedException
predict
in interface InstanceModel
MaltChainedException
public FeatureVector predictExtract(SingleDecision decision) throws MaltChainedException
predictExtract
in interface InstanceModel
MaltChainedException
public FeatureVector extract() throws MaltChainedException
extract
in interface InstanceModel
MaltChainedException
public void terminate() throws MaltChainedException
terminate
in interface Model
MaltChainedException
public void train() throws MaltChainedException
train
in interface InstanceModel
MaltChainedException
protected void initSplitParam(FeatureVector featureVector) throws MaltChainedException
featureVector
- the parent guide model's feature vector.
MaltChainedException
protected void save() throws MaltChainedException
MaltChainedException
protected void load() throws MaltChainedException
MaltChainedException
public Model getParent()
public ClassifierGuide getGuide()
getGuide
in interface Model
protected void setParent(Model parent) throws MaltChainedException
parent
- the parent model
MaltChainedException
public String getModelName() throws MaltChainedException
getModelName
in interface Model
MaltChainedException
public FeatureVector getMasterFeatureVector()
public FeatureVector getDivideFeatureVector()
public int getFrequency()
public void increaseFrequency()
increaseFrequency
in interface InstanceModel
public void decreaseFrequency()
decreaseFrequency
in interface InstanceModel
protected void setFrequency(int frequency)
frequency
- (number of instances)public String toString()
toString
in class Object
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |