DependencyStructure (MaltParser 1.4.1)
Date: 2010-07-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.maltparser.core.syntaxgraph
Interface DependencyStructure

All Superinterfaces:
  LabeledStructure, SecEdgeStructure, Structure, TokenStructure

All Known Implementing Classes:
  DependencyGraph, MappablePhraseStructureGraph

    public interface DependencyStructure

extends TokenStructure, SecEdgeStructure

Author:
  Johan Hall

Method Summary
`Edge` | `addDependencyEdge(int headIndex, int dependentIndex)` Adds an edge from the head to the dependent identified by the indices of the dependency nodes.
`DependencyNode` | `addDependencyNode()`
`DependencyNode` | `addDependencyNode(int index)`
`int` | `getDefaultRootEdgeLabelCode(SymbolTable table)` Returns the default edge label of the root as an integer value.
`LabelSet` | `getDefaultRootEdgeLabels()`
`String` | `getDefaultRootEdgeLabelSymbol(SymbolTable table)` Returns the default edge label of the root as a string value.
`SortedSet<Integer>` | `getDependencyIndices()` Returns a sorted set of integers {0,s,..n} , where each index i identifies a dependency node.
`DependencyNode` | `getDependencyNode(int index)` Returns the dependency node identified by index if it exists, otherwise null.
`DependencyNode` | `getDependencyRoot()` Returns the root of the dependency structure.
`SortedSet<Edge>` | `getEdges()`
`int` | `getHighestDependencyNodeIndex()`
`boolean` | `hasLabeledDependency(int index)` Returns true if the head edge of the dependency node with index is labeled, otherwise false.
`boolean` | `isConnected()` Returns true if all nodes in the dependency structure are connected, otherwise false.
`boolean` | `isProjective()` Returns true if all edges in the dependency structure are projective, otherwise false.
`boolean` | `isSingleHeaded()` Returns true if all dependency nodes have at most one incoming edge, otherwise false.
`boolean` | `isTree()` Returns true if the dependency structure are a tree (isConnected() && isSingleHeaded()), otherwise false.
`void` | `linkAllTreesToRoot()` Links all subtrees to the root of the dependency structure.
`Edge` | `moveDependencyEdge(int newHeadIndex, int dependentIndex)` Replace the head of the dependent with a new head.
`int` | `nDependencyNode()`
`int` | `nEdges()` Returns the number of edges
`int` | `nNonProjectiveEdges()` Returns the number of non-projective edges in the dependency structure.
`void` | `removeDependencyEdge(int headIndex, int dependentIndex)` Remove an edge from the head to the dependent identified by the indices of the dependency nodes.
`void` | `setDefaultRootEdgeLabel(SymbolTable table, String defaultRootSymbol)` Sets the default edge label of the root.
`void` | `setDefaultRootEdgeLabels(String rootLabelOption, SortedMap<String,SymbolTable> edgeSymbolTables)` Sets the default edge label of the root according to the default root label option

Methods inherited from interface org.maltparser.core.syntaxgraph.TokenStructure
`addTokenNode, addTokenNode, getHighestTokenIndex, getSentenceID, getTokenIndices, getTokenNode, hasTokens, nTokenNode, setSentenceID`

Methods inherited from interface org.maltparser.core.syntaxgraph.Structure
`clear`

Methods inherited from interface org.maltparser.core.syntaxgraph.LabeledStructure
`addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables`

Methods inherited from interface org.maltparser.core.syntaxgraph.SecEdgeStructure
`addSecondaryEdge, removeSecondaryEdge`

Method Detail

### addDependencyNode

    DependencyNode addDependencyNode()
                                     throws MaltChainedException

  Throws:
    `MaltChainedException`

### addDependencyNode

    DependencyNode addDependencyNode(int index)
                                     throws MaltChainedException

  Throws:
    `MaltChainedException`

### getDependencyNode

    DependencyNode getDependencyNode(int index)
                                     throws MaltChainedException

  Returns the dependency node identified by index if it exists, otherwise null.

  Parameters:
    `index` - the index of the dependency node
  Returns:
    the dependency node identified by index if it exists, otherwise null.
  Throws:
    `MaltChainedException`

### nDependencyNode

    int nDependencyNode()

### getHighestDependencyNodeIndex

    int getHighestDependencyNodeIndex()

### addDependencyEdge

    Edge addDependencyEdge(int headIndex,
                           int dependentIndex)
                           throws MaltChainedException

  Adds an edge from the head to the dependent identified by the indices of the dependency nodes.

  Parameters:
    `headIndex` - the index of the head dependency node
    `dependentIndex` - the index of the dependent dependency node
  Returns:
    the edge that have been added.
  Throws:
    `MaltChainedException`

### moveDependencyEdge

    Edge moveDependencyEdge(int newHeadIndex,
                            int dependentIndex)
                            throws MaltChainedException

  Replace the head of the dependent with a new head. The labels are not affected.

  Parameters:
    `newHeadIndex` - the index of the new head dependency node
    `dependentIndex` - the index of the dependent dependency node
  Returns:
    the edge that have been moved.
  Throws:
    `MaltChainedException`

### removeDependencyEdge

    void removeDependencyEdge(int headIndex,
                              int dependentIndex)
                              throws MaltChainedException

  Remove an edge from the head to the dependent identified by the indices of the dependency nodes.

  Parameters:
    `headIndex` - the index of the head dependency node
    `dependentIndex` - the index of the dependent dependency node
  Throws:
    `MaltChainedException`

### nEdges

    int nEdges()

  Returns the number of edges

  Returns:
    the number of edges

### getEdges

    SortedSet<Edge> getEdges()

### getDependencyIndices

    SortedSet<Integer> getDependencyIndices()

  Returns a sorted set of integers {0,s,..n} , where each index i identifies a dependency node. Index 0 should always be the root dependency node and index s is the first terminal node and index n is the last terminal node.

  Returns:
    a sorted set of integers

### getDependencyRoot

    DependencyNode getDependencyRoot()

  Returns the root of the dependency structure.

  Returns:
    the root of the dependency structure.

### hasLabeledDependency

    boolean hasLabeledDependency(int index)
                                 throws MaltChainedException

  Returns true if the head edge of the dependency node with index is labeled, otherwise false.

  Parameters:
    `index` - the index of the dependency node
  Returns:
    true if the head edge of the dependency node with index is labeled, otherwise false.
  Throws:
    `MaltChainedException`

### isConnected

    boolean isConnected()

  Returns true if all nodes in the dependency structure are connected, otherwise false.

  Returns:
    true if all nodes in the dependency structure are connected, otherwise false.

### isProjective

    boolean isProjective()
                         throws MaltChainedException

  Returns true if all edges in the dependency structure are projective, otherwise false.

  Returns:
    true if all edges in the dependency structure are projective, otherwise false.
  Throws:
    `MaltChainedException`

### isSingleHeaded

    boolean isSingleHeaded()

  Returns true if all dependency nodes have at most one incoming edge, otherwise false.

  Returns:
    true if all dependency nodes have at most one incoming edge, otherwise false.

### isTree

    boolean isTree()

  Returns true if the dependency structure are a tree (isConnected() && isSingleHeaded()), otherwise false.

  Returns:
    true if the dependency structure are a tree (isConnected() && isSingleHeaded()), otherwise false.

### nNonProjectiveEdges

    int nNonProjectiveEdges()
                            throws MaltChainedException

  Returns the number of non-projective edges in the dependency structure.

  Returns:
    the number of non-projective edges in the dependency structure.
  Throws:
    `MaltChainedException`

### linkAllTreesToRoot

    void linkAllTreesToRoot()
                            throws MaltChainedException

  Links all subtrees to the root of the dependency structure.

  Throws:
    `MaltChainedException`

### getDefaultRootEdgeLabels

    LabelSet getDefaultRootEdgeLabels()
                                      throws MaltChainedException

  Throws:
    `MaltChainedException`

### getDefaultRootEdgeLabelSymbol

    String getDefaultRootEdgeLabelSymbol(SymbolTable table)
                                         throws MaltChainedException

  Returns the default edge label of the root as a string value.

  Parameters:
    `table` - the symbol table that identifies the label type.
  Returns:
    the default edge label of the root.
  Throws:
    `MaltChainedException`

### getDefaultRootEdgeLabelCode

    int getDefaultRootEdgeLabelCode(SymbolTable table)
                                    throws MaltChainedException

  Returns the default edge label of the root as an integer value.

  Parameters:
    `table` - the symbol table that identifies the label type.
  Returns:
    the default edge label of the root as an integer value.
  Throws:
    `MaltChainedException`

### setDefaultRootEdgeLabel

    void setDefaultRootEdgeLabel(SymbolTable table,
                                 String defaultRootSymbol)
                                 throws MaltChainedException

  Sets the default edge label of the root.

  Parameters:
    `table` - the symbol table that identifies the label type.
    `defaultRootSymbol` - the default root edge label
  Throws:
    `MaltChainedException`

### setDefaultRootEdgeLabels

    void setDefaultRootEdgeLabels(String rootLabelOption,
                                  SortedMap<String,SymbolTable> edgeSymbolTables)
                                  throws MaltChainedException

  Sets the default edge label of the root according to the default root label option

  Parameters:
    `rootLabelOption` - the default root label option
    `edgeSymbolTables` - a sorted map that maps the symbol table name to the symbol table object.
  Throws:
    `MaltChainedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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