org.maltparser.parser.guide
Class SingleGuide
java.lang.Object
org.maltparser.parser.guide.SingleGuide
- All Implemented Interfaces:
- Guide
public class SingleGuide
- extends Object
- implements Guide
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
Nested classes/interfaces inherited from interface org.maltparser.parser.guide.Guide |
Guide.GuideMode |
SingleGuide
public SingleGuide(DependencyParserConfig configuration,
GuideHistory history,
Guide.GuideMode guideMode)
throws MaltChainedException
- Throws:
MaltChainedException
addInstance
public void addInstance(GuideDecision decision)
throws MaltChainedException
- Specified by:
addInstance
in interface Guide
- 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 Guide
- 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 Guide
- Throws:
MaltChainedException
predictFromKBestList
public boolean predictFromKBestList(GuideDecision decision)
throws MaltChainedException
- Specified by:
predictFromKBestList
in interface Guide
- 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 Guide
getGuideMode
public Guide.GuideMode getGuideMode()
- Specified by:
getGuideMode
in interface Guide
getFeatureModelManager
public FeatureModelManager getFeatureModelManager()
- Specified by:
getFeatureModelManager
in interface Guide
setConfiguration
protected void setConfiguration(DependencyParserConfig configuration)
setHistory
protected void setHistory(GuideHistory actionHistory)
setGuideMode
protected void setGuideMode(Guide.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
toString
public String toString()
- Overrides:
toString
in class Object
Copyright 2007-2008 Johan Hall, Jens Nilsson and Joakim Nivre.