MaltParser 1.0.2

org.maltparser.parser.algorithm.nivre
Class Nivre

java.lang.Object
  extended by org.maltparser.parser.algorithm.nivre.Nivre
All Implemented Interfaces:
ParsingAlgorithm, Featurable
Direct Known Subclasses:
NivreEager, NivreStandard

public abstract class Nivre
extends Object
implements ParsingAlgorithm

Since:
1.0
Author:
Joakim Nivre, Johan Hall

Field Summary
protected  SingleMaltConfiguration configuration
           
protected  DependencyGraph dependencyGraph
           
protected  SymbolTable deprel
           
protected  Stack<Node> input
           
static int NORMAL
           
protected  ParserAction parserAction
           
protected  boolean postProcessing
           
static int RELAXED
           
protected  int rootHandling
           
protected  Sentence sentence
           
protected static int SHIFT
           
protected  Stack<Node> stack
           
static int STRICT
           
 
Constructor Summary
Nivre(SingleMaltConfiguration configuration, Sentence sentence)
           
 
Method Summary
protected abstract  boolean checkParserAction(DependencyGraph dg)
           
 SingleMaltConfiguration getConfiguration()
           
 DependencyGraph getDependencyGraph()
           
abstract  String getName()
           
 Node getNode(String dataStructure, int index)
           
 ParserAction getParserAction()
           
 int getRootHandling()
           
protected abstract  void initParserAction()
           
 boolean isOperation(String dataStructure)
           
 DependencyGraph oracleParse(DependencyGraph goldDependencyGraph)
           
protected abstract  void oraclePredict(DependencyGraph gold)
           
 DependencyGraph parse()
           
protected abstract  void transition(DependencyGraph dg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

sentence

protected Sentence sentence

dependencyGraph

protected DependencyGraph dependencyGraph

parserAction

protected ParserAction parserAction

deprel

protected SymbolTable deprel

configuration

protected SingleMaltConfiguration configuration

rootHandling

protected int rootHandling

postProcessing

protected boolean postProcessing

stack

protected Stack<Node> stack

input

protected Stack<Node> input
Constructor Detail

Nivre

public Nivre(SingleMaltConfiguration configuration,
             Sentence sentence)
      throws MaltChainedException
Throws:
MaltChainedException
Method Detail

parse

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

oracleParse

public DependencyGraph oracleParse(DependencyGraph goldDependencyGraph)
                            throws MaltChainedException
Specified by:
oracleParse in interface ParsingAlgorithm
Throws:
MaltChainedException

isOperation

public boolean isOperation(String dataStructure)
                    throws MaltChainedException
Specified by:
isOperation in interface Featurable
Throws:
MaltChainedException

getNode

public Node getNode(String dataStructure,
                    int index)
             throws MaltChainedException
Specified by:
getNode in interface Featurable
Throws:
MaltChainedException

getRootHandling

public int getRootHandling()

getParserAction

public ParserAction getParserAction()
Specified by:
getParserAction in interface ParsingAlgorithm

getConfiguration

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

getDependencyGraph

public DependencyGraph getDependencyGraph()
Specified by:
getDependencyGraph in interface ParsingAlgorithm

transition

protected abstract void transition(DependencyGraph dg)
                            throws MaltChainedException
Throws:
MaltChainedException

checkParserAction

protected abstract boolean checkParserAction(DependencyGraph dg)
                                      throws MaltChainedException
Throws:
MaltChainedException

oraclePredict

protected abstract void oraclePredict(DependencyGraph gold)
                               throws MaltChainedException
Throws:
MaltChainedException

initParserAction

protected abstract void initParserAction()

getName

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

MaltParser 1.0.2

Copyright 2007 Johan Hall, Jens Nilsson and Joakim Nivre.