|
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.AtomicModel
public class AtomicModel
| Constructor Summary | |
|---|---|
AtomicModel(int index,
FeatureVector features,
Model parent)
Constructs an atomic model. |
|
| Method Summary | |
|---|---|
void |
addInstance(SingleDecision decision)
|
void |
decreaseFrequency()
|
FeatureVector |
extract()
|
void |
finalizeSentence(DependencyStructure dependencyGraph)
|
FeatureVector |
getFeatures()
Returns the feature vector used by this atomic model |
int |
getFrequency()
Returns the frequency (number of instances) |
ClassifierGuide |
getGuide()
|
int |
getIndex()
Returns the index of the atomic model |
LearningMethod |
getMethod()
Returns a learner object |
String |
getModelName()
|
Model |
getParent()
Returns the parent guide model |
void |
increaseFrequency()
Increase the frequency by 1 |
void |
initMethod()
Initialize the learning method according to the option --learner-method. |
void |
moveAllInstances(AtomicModel model,
FeatureFunction 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(SingleDecision decision)
|
FeatureVector |
predictExtract(SingleDecision decision)
|
protected void |
setFeatures(FeatureVector features)
Sets the feature vector used by the atomic model. |
protected void |
setFrequency(int frequency)
Sets the frequency (number of instances) |
protected void |
setIndex(int 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(Model parent)
Sets the parent guide model |
void |
terminate()
|
String |
toString()
|
void |
train()
Invokes the train() of the learning method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AtomicModel(int index,
FeatureVector features,
Model 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.parent - the parent guide model.
MaltChainedException| Method Detail |
|---|
public void addInstance(SingleDecision decision)
throws MaltChainedException
addInstance in interface InstanceModelMaltChainedException
public void noMoreInstances()
throws MaltChainedException
noMoreInstances in interface ModelMaltChainedException
public void finalizeSentence(DependencyStructure dependencyGraph)
throws MaltChainedException
finalizeSentence in interface ModelMaltChainedException
public boolean predict(SingleDecision decision)
throws MaltChainedException
predict in interface InstanceModelMaltChainedException
public FeatureVector predictExtract(SingleDecision decision)
throws MaltChainedException
predictExtract in interface InstanceModelMaltChainedException
public FeatureVector extract()
throws MaltChainedException
extract in interface InstanceModelMaltChainedException
public void terminate()
throws MaltChainedException
terminate in interface ModelMaltChainedException
public void moveAllInstances(AtomicModel model,
FeatureFunction 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 InstanceModelMaltChainedException
public void initMethod()
throws MaltChainedException
MaltChainedException
public Model getParent()
throws MaltChainedException
MaltChainedExceptionprotected void setParent(Model parent)
parent - the parent guide modelpublic String getModelName()
getModelName in interface Modelprotected void setModelName(String modelName)
modelName - the name of the atomic modelpublic FeatureVector getFeatures()
protected void setFeatures(FeatureVector features)
features - a feature vector objectpublic ClassifierGuide getGuide()
getGuide in interface Modelpublic int getIndex()
protected void setIndex(int index)
index - index value (-1..n) of the atomic modelpublic int getFrequency()
public void increaseFrequency()
increaseFrequency in interface InstanceModelpublic void decreaseFrequency()
decreaseFrequency in interface InstanceModelprotected void setFrequency(int frequency)
frequency - (number of instances)public LearningMethod getMethod()
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 | |||||||||