MaltParser 1.4.1

org.maltparser.parser.guide
Class SingleGuide

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.maltparser.parser.guide.ClassifierGuide
ClassifierGuide.GuideMode
 
Constructor Summary
SingleGuide(DependencyParserConfig configuration, GuideHistory history, ClassifierGuide.GuideMode guideMode)
           
 
Method Summary
 void addInstance(GuideDecision decision)
           
 FeatureVector extract()
           
 void finalizeSentence(DependencyStructure dependencyGraph)
           
 DependencyParserConfig getConfiguration()
           
 DecisionModel getDecisionModel()
           
 FeatureModelManager getFeatureModelManager()
           
 ClassifierGuide.GuideMode getGuideMode()
           
 String getGuideName()
           
 GuideHistory getHistory()
           
protected  void initDecisionModel(SingleDecision decision)
           
protected  void initFeatureModel()
           
protected  void initFeatureModelManager()
           
protected  void initHistory()
           
 void noMoreInstances()
           
 void predict(GuideDecision decision)
           
 FeatureVector predictExtract(GuideDecision decision)
           
 boolean predictFromKBestList(GuideDecision decision)
           
protected  void setConfiguration(DependencyParserConfig configuration)
           
protected  void setGuideMode(ClassifierGuide.GuideMode guideMode)
           
 void setGuideName(String guideName)
           
protected  void setHistory(GuideHistory actionHistory)
           
 void terminate()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleGuide

public SingleGuide(DependencyParserConfig configuration,
                   GuideHistory history,
                   ClassifierGuide.GuideMode guideMode)
            throws MaltChainedException
Throws:
MaltChainedException
Method Detail

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

MaltParser 1.4.1

Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.