MaltParser 1.0.2

org.maltparser.core.graph
Class DependencyGraph

java.lang.Object
  extended by org.maltparser.core.graph.DependencyGraph
Direct Known Subclasses:
SingleHeadedDependencyGraph

public class DependencyGraph
extends Object

Since:
1.0
Author:
Johan Hall

Field Summary
protected  int capacity
           
protected  Node[] nodes
           
protected  int numberOfComponents
           
protected  HashMap<SymbolTable,SymbolTable> outputColumnMap
           
protected  RootLabels rootLabels
           
protected  Sentence sentence
           
protected  boolean singleheaded
           
protected  int size
           
 
Constructor Summary
DependencyGraph(Sentence sentence, String rootLabel)
           
 
Method Summary
 void addArc(Node head, Node dependent, ArcLabels arcLabelCodes)
           
 void changeOutputColumnSymbolTable(SymbolTable columnTable, SymbolTable table)
           
 void clear()
           
 void createFromGoldStandard()
           
 void deprojectivize(String markingStrategy)
           
 ArcLabels getArcLabels(int headindex, int depindex)
           
 int getCapacity()
           
 DataFormatInstance getDataFormatInstance()
           
 Integer getLabelCode(int headindex, int depindex, SymbolTable table)
           
 Node getNode(int index)
           
 Node getRoot()
           
 RootLabels getRootLabels()
           
 Sentence getSentence()
           
 int getSize()
           
 Node getTokenNode(int index)
           
 boolean hasArc(int headindex, int depindex)
           
 boolean hasLabeledDependency(Node dependent)
           
 boolean hasLabeledDependency(Node dependent, SymbolTable table)
           
protected  void initNodes(String rootLabel)
           
 boolean isConnected()
           
 boolean isSingleHeaded()
           
 boolean isTree()
           
protected  Node link(Node x, Node y)
           
 void linkAllTokensToRoot()
           
 void linkAllTreesToRoot()
           
 boolean linkedLeftOf(int right, int left)
           
 void projectivize(String markingStrategy, String coveredRoot, String liftingOrder)
           
protected  void setCapacity(int capacity)
           
protected  void setSentence(Sentence sentence)
           
protected  void setSize(int size)
           
 String toTab()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

protected Node[] nodes

capacity

protected int capacity

size

protected int size

sentence

protected Sentence sentence

rootLabels

protected RootLabels rootLabels

outputColumnMap

protected HashMap<SymbolTable,SymbolTable> outputColumnMap

singleheaded

protected boolean singleheaded

numberOfComponents

protected int numberOfComponents
Constructor Detail

DependencyGraph

public DependencyGraph(Sentence sentence,
                       String rootLabel)
                throws MaltChainedException
Throws:
MaltChainedException
Method Detail

addArc

public void addArc(Node head,
                   Node dependent,
                   ArcLabels arcLabelCodes)
            throws MaltChainedException
Throws:
MaltChainedException

getDataFormatInstance

public DataFormatInstance getDataFormatInstance()

getRoot

public Node getRoot()
             throws MaltChainedException
Throws:
MaltChainedException

hasArc

public boolean hasArc(int headindex,
                      int depindex)

getArcLabels

public ArcLabels getArcLabels(int headindex,
                              int depindex)

getLabelCode

public Integer getLabelCode(int headindex,
                            int depindex,
                            SymbolTable table)

getNode

public Node getNode(int index)

getTokenNode

public Node getTokenNode(int index)

getRootLabels

public RootLabels getRootLabels()
                         throws MaltChainedException
Throws:
MaltChainedException

link

protected Node link(Node x,
                    Node y)

isSingleHeaded

public boolean isSingleHeaded()

isConnected

public boolean isConnected()

isTree

public boolean isTree()

linkAllTokensToRoot

public void linkAllTokensToRoot()
                         throws MaltChainedException
Throws:
MaltChainedException

linkAllTreesToRoot

public void linkAllTreesToRoot()
                        throws MaltChainedException
Throws:
MaltChainedException

clear

public void clear()

linkedLeftOf

public boolean linkedLeftOf(int right,
                            int left)

hasLabeledDependency

public boolean hasLabeledDependency(Node dependent,
                                    SymbolTable table)

hasLabeledDependency

public boolean hasLabeledDependency(Node dependent)

getCapacity

public int getCapacity()

getSize

public int getSize()

getSentence

public Sentence getSentence()

createFromGoldStandard

public void createFromGoldStandard()
                            throws MaltChainedException
Throws:
MaltChainedException

projectivize

public void projectivize(String markingStrategy,
                         String coveredRoot,
                         String liftingOrder)
                  throws MaltChainedException
Throws:
MaltChainedException

deprojectivize

public void deprojectivize(String markingStrategy)
                    throws MaltChainedException
Throws:
MaltChainedException

toTab

public String toTab()
             throws MaltChainedException
Throws:
MaltChainedException

changeOutputColumnSymbolTable

public void changeOutputColumnSymbolTable(SymbolTable columnTable,
                                          SymbolTable table)

initNodes

protected void initNodes(String rootLabel)
                  throws MaltChainedException
Throws:
MaltChainedException

setCapacity

protected void setCapacity(int capacity)

setSize

protected void setSize(int size)

setSentence

protected void setSentence(Sentence sentence)

MaltParser 1.0.2

Copyright 2007 Johan Hall, Jens Nilsson and Joakim Nivre.