org.maltparser.parser.guide
Class SingleGuide
java.lang.Object
org.maltparser.parser.guide.SingleGuide
- All Implemented Interfaces:
- ClassifierGuide, Guide
public class SingleGuide
- extends Object
- implements ClassifierGuide
The guide is used by a parsing algorithm to predict the next parser action during parsing and to
add a instance to the training instance set during learning.
- Since:
- 1.0
- Author:
- Johan Hall
SingleGuide
public SingleGuide(DependencyParserConfig configuration,
GuideHistory history,
ClassifierGuide.GuideMode guideMode)
throws MaltChainedException
- Throws:
MaltChainedException
addInstance
public void addInstance(GuideDecision decision)
throws MaltChainedException
- Specified by:
addInstance
in interface ClassifierGuide
- Throws:
MaltChainedException
finalizeSentence
public void finalizeSentence(DependencyStructure dependencyGraph)
throws MaltChainedException
- Specified by:
finalizeSentence
in interface Guide
- Throws:
MaltChainedException
noMoreInstances
public void noMoreInstances()
throws MaltChainedException
- Specified by:
noMoreInstances
in interface ClassifierGuide
- Throws:
MaltChainedException
terminate
public void terminate()
throws MaltChainedException
- Specified by:
terminate
in interface Guide
- Throws:
MaltChainedException
predict
public void predict(GuideDecision decision)
throws MaltChainedException
- Specified by:
predict
in interface ClassifierGuide
- Throws:
MaltChainedException
predictExtract
public FeatureVector predictExtract(GuideDecision decision)
throws MaltChainedException
- Specified by:
predictExtract
in interface ClassifierGuide
- Throws:
MaltChainedException
extract
public FeatureVector extract()
throws MaltChainedException
- Specified by:
extract
in interface ClassifierGuide
- Throws:
MaltChainedException
predictFromKBestList
public boolean predictFromKBestList(GuideDecision decision)
throws MaltChainedException
- Specified by:
predictFromKBestList
in interface ClassifierGuide
- Throws:
MaltChainedException
getDecisionModel
public DecisionModel getDecisionModel()
getConfiguration
public DependencyParserConfig getConfiguration()
- Specified by:
getConfiguration
in interface Guide
getHistory
public GuideHistory getHistory()
- Specified by:
getHistory
in interface ClassifierGuide
getGuideMode
public ClassifierGuide.GuideMode getGuideMode()
- Specified by:
getGuideMode
in interface ClassifierGuide
getFeatureModelManager
public FeatureModelManager getFeatureModelManager()
- Specified by:
getFeatureModelManager
in interface ClassifierGuide
setConfiguration
protected void setConfiguration(DependencyParserConfig configuration)
setHistory
protected void setHistory(GuideHistory actionHistory)
setGuideMode
protected void setGuideMode(ClassifierGuide.GuideMode guideMode)
initHistory
protected void initHistory()
throws MaltChainedException
- Throws:
MaltChainedException
initDecisionModel
protected void initDecisionModel(SingleDecision decision)
throws MaltChainedException
- Throws:
MaltChainedException
initFeatureModelManager
protected void initFeatureModelManager()
throws MaltChainedException
- Throws:
MaltChainedException
initFeatureModel
protected void initFeatureModel()
throws MaltChainedException
- Throws:
MaltChainedException
getGuideName
public String getGuideName()
- Specified by:
getGuideName
in interface Guide
setGuideName
public void setGuideName(String guideName)
- Specified by:
setGuideName
in interface Guide
toString
public String toString()
- Overrides:
toString
in class Object
Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.