|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.maltparser.parser.guide.instmodel.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 predicition time, but can also decrease the accuracy of the parser.
| Constructor Summary | |
|---|---|
FeatureDivideModel(FeatureVector features,
ClassTable classCodeTable,
GuideModel parent)
Constructs a feature divide model. |
|
| Method Summary | |
|---|---|
void |
addInstance(ParserAction parserAction)
|
void |
decreaseFrequency()
|
void |
finalize()
|
void |
finalizeSentence(Sentence sentence,
DependencyGraph dependencyGraph)
|
ClassTable |
getClassCodeTable()
Returns a class table object |
SingleMaltConfiguration |
getConfiguration()
|
FeatureVector |
getDivideFeatureVector()
Returns the divide feature vector |
File |
getFile(String suffix)
|
Integer |
getFrequency()
Returns the frequency (number of instances) |
InputStreamReader |
getInputStreamReader(String suffix)
|
FeatureVector |
getMasterFeatureVector()
Returns the "sum-up" or master feature vector |
String |
getModelName()
|
OutputStreamWriter |
getOutputStreamWriter(String suffix)
|
GuideModel |
getParent()
Returns the parent guide model |
int |
getParserMode()
|
ParsingAlgorithm |
getParsingAlgorithm()
|
void |
increaseFrequency()
Increase the frequency by 1 |
protected void |
initSplitParam(FeatureVector features)
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()
|
protected void |
save()
Saves the feature divide model settings .fsm file. |
protected void |
setClassCodeTable(ClassTable classCodeTable)
Sets the class table |
protected void |
setFrequency(Integer frequency)
Sets the frequency (number of instances) |
protected void |
setParent(GuideModel parent)
Sets the parent guide model |
String |
toString()
|
void |
train()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FeatureDivideModel(FeatureVector features,
ClassTable classCodeTable,
GuideModel parent)
throws MaltChainedException
features - the feature vector used by the atomic model.classCodeTable - the class code table used by the atomic model.parent - the parent guide model.
MaltChainedException| Method Detail |
|---|
public void addInstance(ParserAction parserAction)
throws MaltChainedException
addInstance in interface GuideModelMaltChainedException
public void noMoreInstances()
throws MaltChainedException
noMoreInstances in interface GuideModelMaltChainedException
public void finalizeSentence(Sentence sentence,
DependencyGraph dependencyGraph)
throws MaltChainedException
finalizeSentence in interface GuideModelMaltChainedException
public boolean predict()
throws MaltChainedException
predict in interface GuideModelMaltChainedException
public void finalize()
throws MaltChainedException
finalize in interface GuideModelfinalize in class ObjectMaltChainedException
public void train()
throws MaltChainedException
train in interface InstanceModelMaltChainedException
protected void initSplitParam(FeatureVector features)
throws MaltChainedException
features - the parent guide model's feature vector.
MaltChainedException
protected void save()
throws MaltChainedException
MaltChainedException
protected void load()
throws MaltChainedException
MaltChainedExceptionpublic GuideModel getParent()
public ParsingAlgorithm getParsingAlgorithm()
throws MaltChainedException
getParsingAlgorithm in interface GuideModelMaltChainedException
protected void setParent(GuideModel parent)
throws MaltChainedException
parent - the parent guide model
MaltChainedException
public String getModelName()
throws MaltChainedException
getModelName in interface GuideModelMaltChainedExceptionpublic FeatureVector getMasterFeatureVector()
public FeatureVector getDivideFeatureVector()
public ClassTable getClassCodeTable()
protected void setClassCodeTable(ClassTable classCodeTable)
classCodeTable - a class table object
public SingleMaltConfiguration getConfiguration()
throws MaltChainedException
getConfiguration in interface GuideModelMaltChainedException
public int getParserMode()
throws MaltChainedException
getParserMode in interface GuideModelMaltChainedException
public OutputStreamWriter getOutputStreamWriter(String suffix)
throws MaltChainedException
getOutputStreamWriter in interface GuideModelMaltChainedException
public InputStreamReader getInputStreamReader(String suffix)
throws MaltChainedException
getInputStreamReader in interface GuideModelMaltChainedException
public File getFile(String suffix)
throws MaltChainedException
getFile in interface GuideModelMaltChainedExceptionpublic Integer getFrequency()
public void increaseFrequency()
increaseFrequency in interface InstanceModelpublic void decreaseFrequency()
decreaseFrequency in interface InstanceModelprotected void setFrequency(Integer frequency)
frequency - (number of instances)public String toString()
toString in class Object
|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||