org.maltparser.parser.algorithm.nivre
Class Nivre
java.lang.Object
org.maltparser.parser.algorithm.nivre.Nivre
- All Implemented Interfaces:
- ParsingAlgorithm
- Direct Known Subclasses:
- NivreEager, NivreMalt04, NivreStandard
public abstract class Nivre
- extends Object
- implements ParsingAlgorithm
- Since:
- 1.0
- Author:
- Joakim Nivre, Johan Hall
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHIFT
protected static final int SHIFT
- See Also:
- Constant Field Values
STRICT
public static final int STRICT
- See Also:
- Constant Field Values
RELAXED
public static final int RELAXED
- See Also:
- Constant Field Values
NORMAL
public static final int NORMAL
- 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 final SingleMalt configuration
currentAction
protected GuideUserAction currentAction
tableHandlers
protected HashMap<String,TableHandler> tableHandlers
transitionTableHandler
protected TransitionTableHandler transitionTableHandler
rootHandling
protected int rootHandling
postProcessing
protected boolean postProcessing
stack
protected final Stack<DependencyNode> stack
input
protected final Stack<DependencyNode> input
complexTransition
protected boolean complexTransition
Nivre
public Nivre(SingleMalt configuration)
throws MaltChainedException
- Throws:
MaltChainedException
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
isActionContainersLabeled
protected boolean isActionContainersLabeled()
addEdgeLabels
protected void addEdgeLabels(Edge e)
throws MaltChainedException
- Throws:
MaltChainedException
getArcLabels
protected LabelSet getArcLabels(DependencyStructure parseDependencyGraph)
throws MaltChainedException
- Throws:
MaltChainedException
getStackNode
public DependencyNode getStackNode(int index)
throws MaltChainedException
- Throws:
MaltChainedException
getInputNode
public DependencyNode getInputNode(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
getRootHandling
public int getRootHandling()
clear
protected void clear(DependencyStructure dg)
throws MaltChainedException
- Throws:
MaltChainedException
initRootHandling
protected void initRootHandling()
throws MaltChainedException
- Throws:
MaltChainedException
addTransition
protected void addTransition(ActionContainer transitionContainer,
GuideUserAction action,
int value)
throws MaltChainedException
- Throws:
MaltChainedException
initPostProcessing
protected void initPostProcessing()
throws MaltChainedException
- Throws:
MaltChainedException
getConfiguration
public SingleMalt getConfiguration()
- Specified by:
getConfiguration
in interface ParsingAlgorithm
initHistory
protected void initHistory()
throws MaltChainedException
- Throws:
MaltChainedException
getHistory
public GuideUserHistory getHistory()
- Specified by:
getHistory
in interface ParsingAlgorithm
getTransition
protected abstract int getTransition()
updateActionContainers
protected abstract void updateActionContainers(int transition,
LabelSet arcLabels)
throws MaltChainedException
- Throws:
MaltChainedException
transition
protected abstract void transition(DependencyStructure dg)
throws MaltChainedException
- Throws:
MaltChainedException
addAvailableTransitionToTable
protected abstract void addAvailableTransitionToTable(TransitionTable ttable)
throws MaltChainedException
- Throws:
MaltChainedException
initWithDefaultTransitions
protected abstract void initWithDefaultTransitions()
throws MaltChainedException
- Throws:
MaltChainedException
checkParserAction
protected abstract boolean checkParserAction(DependencyStructure dg)
throws MaltChainedException
- Throws:
MaltChainedException
oraclePredict
protected abstract void oraclePredict(DependencyStructure gold,
DependencyStructure parseDependencyGraph)
throws MaltChainedException
- Throws:
MaltChainedException
getName
public abstract String getName()
- Specified by:
getName
in interface ParsingAlgorithm
Copyright 2007-2008 Johan Hall, Jens Nilsson and Joakim Nivre.