MaltParser 1.2

org.maltparser.parser.algorithm.covington
Class Covington

java.lang.Object
  extended by org.maltparser.parser.algorithm.covington.Covington
All Implemented Interfaces:
ParsingAlgorithm
Direct Known Subclasses:
CovingtonNonProjective, CovingtonProjective

public abstract class Covington
extends Object
implements ParsingAlgorithm

Since:
1.0
Author:
Joakim Nivre, Johan Hall

Field Summary
protected  ArrayList<ActionContainer> actionContainers
           
protected  boolean allowShift
           
protected  HashSet<ActionContainer> arcLabelActionContainers
           
protected  int behavior
           
protected  boolean complexTransition
           
protected  SingleMalt configuration
           
protected  GuideUserAction currentAction
           
protected  GuideUserHistory history
           
protected  ArrayList<DependencyNode> input
           
protected  int left
           
protected static int LEFTARC
           
protected  int leftstop
           
static int MALT_0_4
           
static int MALT_1_0
           
protected static int NOARC
           
protected  ActionContainer pushActionContainer
           
protected  TransitionTable pushTable
           
protected  int right
           
protected static int RIGHTARC
           
protected  int rightstop
           
protected static int SHIFT
           
protected  HashMap<String,TableHandler> tableHandlers
           
protected  ActionContainer transActionContainer
           
protected  TransitionTableHandler transitionTableHandler
           
 
Constructor Summary
Covington(SingleMalt configuration)
           
 
Method Summary
protected  void addEdgeLabels(Edge e)
           
protected  void addTransition(ActionContainer transitionContainer, GuideUserAction action, int value)
           
protected  boolean checkParserAction(DependencyStructure dg)
           
 SingleMalt getConfiguration()
           
 GuideUserHistory getHistory()
           
 DependencyNode getLeftContextNode(int index)
           
 DependencyNode getLeftNode(int index)
           
 DependencyNode getLeftTarget()
           
abstract  String getName()
           
 DependencyNode getNode(String dataStructure, int index)
           
 DependencyNode getRightContextNode(int index)
           
 DependencyNode getRightNode(int index)
           
 DependencyNode getRightTarget()
           
protected  int getTransition()
           
protected  void initHistory()
           
protected  boolean isActionContainersLabeled()
           
 DependencyStructure oracleParse(DependencyStructure goldDependencyGraph, DependencyStructure parseDependencyGraph)
           
protected  void oraclePredict(DependencyStructure gold)
           
 DependencyStructure parse(DependencyStructure parseDependencyGraph)
           
protected  void transition(DependencyStructure parseDependencyGraph)
           
protected  void updateActionContainers(int transition, LabelSet arcLabels)
           
protected abstract  void updateLeft(DependencyStructure dg, int trans)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MALT_0_4

public static final int MALT_0_4
See Also:
Constant Field Values

MALT_1_0

public static final int MALT_1_0
See Also:
Constant Field Values

SHIFT

protected static final int SHIFT
See Also:
Constant Field Values

NOARC

protected static final int NOARC
See Also:
Constant Field Values

RIGHTARC

protected static final int RIGHTARC
See Also:
Constant Field Values

LEFTARC

protected static final int LEFTARC
See Also:
Constant Field Values

history

protected GuideUserHistory history

actionContainers

protected ArrayList<ActionContainer> actionContainers

transActionContainer

protected ActionContainer transActionContainer

pushActionContainer

protected ActionContainer pushActionContainer

pushTable

protected TransitionTable pushTable

arcLabelActionContainers

protected HashSet<ActionContainer> arcLabelActionContainers

configuration

protected SingleMalt configuration

currentAction

protected GuideUserAction currentAction

tableHandlers

protected HashMap<String,TableHandler> tableHandlers

transitionTableHandler

protected TransitionTableHandler transitionTableHandler

allowShift

protected boolean allowShift

complexTransition

protected boolean complexTransition

behavior

protected int behavior

input

protected ArrayList<DependencyNode> input

right

protected int right

left

protected int left

leftstop

protected int leftstop

rightstop

protected int rightstop
Constructor Detail

Covington

public Covington(SingleMalt configuration)
          throws MaltChainedException
Throws:
MaltChainedException
Method Detail

parse

public DependencyStructure parse(DependencyStructure parseDependencyGraph)
                          throws MaltChainedException
Specified by:
parse in interface ParsingAlgorithm
Throws:
MaltChainedException

oracleParse

public DependencyStructure oracleParse(DependencyStructure goldDependencyGraph,
                                       DependencyStructure parseDependencyGraph)
                                throws MaltChainedException
Specified by:
oracleParse in interface ParsingAlgorithm
Throws:
MaltChainedException

transition

protected void transition(DependencyStructure parseDependencyGraph)
                   throws MaltChainedException
Throws:
MaltChainedException

checkParserAction

protected boolean checkParserAction(DependencyStructure dg)
                             throws MaltChainedException
Throws:
MaltChainedException

oraclePredict

protected void oraclePredict(DependencyStructure gold)
                      throws MaltChainedException
Throws:
MaltChainedException

getTransition

protected int getTransition()

updateActionContainers

protected void updateActionContainers(int transition,
                                      LabelSet arcLabels)
                               throws MaltChainedException
Throws:
MaltChainedException

isActionContainersLabeled

protected boolean isActionContainersLabeled()

addEdgeLabels

protected void addEdgeLabels(Edge e)
                      throws MaltChainedException
Throws:
MaltChainedException

getLeftNode

public DependencyNode getLeftNode(int index)
                           throws MaltChainedException
Throws:
MaltChainedException

getRightNode

public DependencyNode getRightNode(int index)
                            throws MaltChainedException
Throws:
MaltChainedException

getLeftContextNode

public DependencyNode getLeftContextNode(int index)
                                  throws MaltChainedException
Throws:
MaltChainedException

getRightContextNode

public DependencyNode getRightContextNode(int index)
                                   throws MaltChainedException
Throws:
MaltChainedException

getLeftTarget

public DependencyNode getLeftTarget()
Specified by:
getLeftTarget in interface ParsingAlgorithm

getRightTarget

public DependencyNode getRightTarget()
Specified by:
getRightTarget in interface ParsingAlgorithm

getNode

public DependencyNode getNode(String dataStructure,
                              int index)
                       throws MaltChainedException
Throws:
MaltChainedException

addTransition

protected void addTransition(ActionContainer transitionContainer,
                             GuideUserAction action,
                             int value)
                      throws MaltChainedException
Throws:
MaltChainedException

initHistory

protected void initHistory()
                    throws MaltChainedException
Throws:
MaltChainedException

getHistory

public GuideUserHistory getHistory()
Specified by:
getHistory in interface ParsingAlgorithm

getConfiguration

public SingleMalt getConfiguration()
Specified by:
getConfiguration in interface ParsingAlgorithm

getName

public abstract String getName()
Specified by:
getName in interface ParsingAlgorithm

updateLeft

protected abstract void updateLeft(DependencyStructure dg,
                                   int trans)
                            throws MaltChainedException
Throws:
MaltChainedException

MaltParser 1.2

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