public class FeatureDivideModel extends java.lang.Object implements InstanceModel
Constructor and Description |
---|
FeatureDivideModel(Model parent)
Constructs a feature divide model.
|
Modifier and Type | Method and Description |
---|---|
void |
addInstance(FeatureVector featureVector,
SingleDecision decision) |
void |
decreaseFrequency() |
FeatureVector |
extract(FeatureVector featureVector) |
void |
finalizeSentence(DependencyStructure dependencyGraph) |
int |
getFrequency()
Returns the frequency (number of instances)
|
ClassifierGuide |
getGuide() |
java.lang.String |
getModelName() |
Model |
getParent()
Returns the parent model
|
void |
increaseFrequency()
Increase the frequency by 1
|
protected void |
load() |
void |
noMoreInstances(FeatureModel featureModel) |
boolean |
predict(FeatureVector featureVector,
SingleDecision decision) |
FeatureVector |
predictExtract(FeatureVector featureVector,
SingleDecision decision) |
protected void |
save()
Saves the feature divide model settings .dsm file.
|
protected void |
setFrequency(int frequency)
Sets the frequency (number of instances)
|
void |
terminate() |
java.lang.String |
toString() |
void |
train() |
public FeatureDivideModel(Model parent) throws MaltChainedException
parent
- the parent guide model.MaltChainedException
public void addInstance(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
addInstance
in interface InstanceModel
MaltChainedException
public void noMoreInstances(FeatureModel featureModel) throws MaltChainedException
noMoreInstances
in interface Model
MaltChainedException
public void finalizeSentence(DependencyStructure dependencyGraph) throws MaltChainedException
finalizeSentence
in interface Model
MaltChainedException
public boolean predict(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
predict
in interface InstanceModel
MaltChainedException
public FeatureVector predictExtract(FeatureVector featureVector, SingleDecision decision) throws MaltChainedException
predictExtract
in interface InstanceModel
MaltChainedException
public FeatureVector extract(FeatureVector featureVector) 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 save() throws MaltChainedException
MaltChainedException
protected void load() throws MaltChainedException
MaltChainedException
public ClassifierGuide getGuide()
public java.lang.String getModelName() throws MaltChainedException
getModelName
in interface Model
MaltChainedException
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 java.lang.String toString()
toString
in class java.lang.Object
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.