|
MaltParser 1.0.1 | |||||||||
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 GuideModel
MaltChainedException
public void noMoreInstances() throws MaltChainedException
noMoreInstances
in interface GuideModel
MaltChainedException
public void finalizeSentence(Sentence sentence, DependencyGraph dependencyGraph) throws MaltChainedException
finalizeSentence
in interface GuideModel
MaltChainedException
public boolean predict() throws MaltChainedException
predict
in interface GuideModel
MaltChainedException
public void finalize() throws MaltChainedException
finalize
in interface GuideModel
finalize
in class Object
MaltChainedException
public void train() throws MaltChainedException
train
in interface InstanceModel
MaltChainedException
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
MaltChainedException
public GuideModel getParent()
public ParsingAlgorithm getParsingAlgorithm() throws MaltChainedException
getParsingAlgorithm
in interface GuideModel
MaltChainedException
protected void setParent(GuideModel parent) throws MaltChainedException
parent
- the parent guide model
MaltChainedException
public String getModelName() throws MaltChainedException
getModelName
in interface GuideModel
MaltChainedException
public FeatureVector getMasterFeatureVector()
public FeatureVector getDivideFeatureVector()
public ClassTable getClassCodeTable()
protected void setClassCodeTable(ClassTable classCodeTable)
classCodeTable
- a class table objectpublic SingleMaltConfiguration getConfiguration() throws MaltChainedException
getConfiguration
in interface GuideModel
MaltChainedException
public int getParserMode() throws MaltChainedException
getParserMode
in interface GuideModel
MaltChainedException
public OutputStreamWriter getOutputStreamWriter(String suffix) throws MaltChainedException
getOutputStreamWriter
in interface GuideModel
MaltChainedException
public InputStreamReader getInputStreamReader(String suffix) throws MaltChainedException
getInputStreamReader
in interface GuideModel
MaltChainedException
public File getFile(String suffix) throws MaltChainedException
getFile
in interface GuideModel
MaltChainedException
public Integer getFrequency()
public void increaseFrequency()
increaseFrequency
in interface InstanceModel
public void decreaseFrequency()
decreaseFrequency
in interface InstanceModel
protected void setFrequency(Integer frequency)
frequency
- (number of instances)public String toString()
toString
in class Object
|
MaltParser 1.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |