|
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.AtomicModel
public class AtomicModel
Constructor Summary | |
---|---|
AtomicModel(int index,
FeatureVector features,
ClassTable classCodeTable,
GuideModel parent)
Constructs an atomic 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 |
getFeatures()
Returns the feature vector used by this atomic model |
File |
getFile(String suffix)
|
Integer |
getFrequency()
Returns the frequency (number of instances) |
Integer |
getIndex()
Returns the index of the atomic model |
InputStreamReader |
getInputStreamReader(String suffix)
|
LearningMethod |
getMethod()
Returns a learner object |
String |
getModelName()
|
OutputStreamWriter |
getOutputStreamWriter(String suffix)
|
GuideModel |
getParent()
Returns the parent guide model |
int |
getParserMode()
|
ParsingAlgorithm |
getParsingAlgorithm()
|
void |
increaseFrequency()
Increase the frequency by 1 |
void |
initMethod()
Initialize the learning method according to the option --learner-method. |
void |
moveAllInstances(AtomicModel model,
Feature divideFeature,
ArrayList<Integer> divideFeatureIndexVector)
Moves all instance from this atomic model into the destination atomic model and add the divide feature. |
void |
noMoreInstances()
|
boolean |
predict()
|
protected void |
setClassCodeTable(ClassTable classCodeTable)
Sets the class table |
protected void |
setFeatures(FeatureVector features)
Sets the feature vector used by the atomic model. |
protected void |
setFrequency(Integer frequency)
Sets the frequency (number of instances) |
protected void |
setIndex(Integer index)
Sets the index of the model (-1..n), where -1 is a special value. |
protected void |
setModelName(String modelName)
Sets the name of the atomic model |
protected void |
setParent(GuideModel parent)
Sets the parent guide model |
String |
toString()
|
void |
train()
Invokes the train() of the learning method |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AtomicModel(int index, FeatureVector features, ClassTable classCodeTable, GuideModel parent) throws MaltChainedException
index
- the index of the atomic model (-1..n), where -1 is special value (used by a single model
or the master divide model) and n is number of divide models.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 moveAllInstances(AtomicModel model, Feature divideFeature, ArrayList<Integer> divideFeatureIndexVector) throws MaltChainedException
model
- the destination atomic modeldivideFeature
- the divide featuredivideFeatureIndexVector
- the divide feature index vector
MaltChainedException
public void train() throws MaltChainedException
train
in interface InstanceModel
MaltChainedException
public void initMethod() throws MaltChainedException
MaltChainedException
public GuideModel getParent() throws MaltChainedException
MaltChainedException
protected void setParent(GuideModel parent)
parent
- the parent guide modelpublic String getModelName()
getModelName
in interface GuideModel
protected void setModelName(String modelName)
modelName
- the name of the atomic modelpublic FeatureVector getFeatures()
protected void setFeatures(FeatureVector features)
features
- a feature vector objectpublic ClassTable getClassCodeTable()
protected void setClassCodeTable(ClassTable classCodeTable)
classCodeTable
- a class table objectpublic ParsingAlgorithm getParsingAlgorithm() throws MaltChainedException
getParsingAlgorithm
in interface GuideModel
MaltChainedException
public 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 getIndex()
protected void setIndex(Integer index)
index
- index value (-1..n) of the atomic modelpublic 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 LearningMethod getMethod()
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 |