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

## org.maltparser.core.syntaxgraph
Class PhraseStructureGraph

    java.lang.Object
      org.maltparser.core.syntaxgraph.SyntaxGraph
          org.maltparser.core.syntaxgraph.Sentence
              org.maltparser.core.syntaxgraph.PhraseStructureGraph

All Implemented Interfaces:
  Observer, LabeledStructure, PhraseStructure, SecEdgeStructure, Structure, TokenStructure

    public class PhraseStructureGraph

extends Sentence
implements PhraseStructure

Author:
  Johan Hall

Field Summary
`protected ObjectPoolList<Edge>` | `edgePool`
`protected SortedSet<Edge>` | `graphEdges`
`protected SortedMap<Integer,NonTerminal>` | `nonTerminalNodes`
`protected ObjectPoolList<NonTerminal>` | `nonTerminalPool`
`protected Root` | `root`

Fields inherited from class org.maltparser.core.syntaxgraph.Sentence
`sentenceID, terminalNodes, terminalPool`

Fields inherited from class org.maltparser.core.syntaxgraph.SyntaxGraph
`labelSetPool, numberOfComponents, symbolTables`

Constructor Summary
`PhraseStructureGraph(SymbolTableHandler symbolTables)`

Method Summary
`PhraseStructureNode` | `addNonTerminalNode()`
`PhraseStructureNode` | `addNonTerminalNode(int index)`
`Edge` | `addPhraseStructureEdge(PhraseStructureNode parent, PhraseStructureNode child)`
`Edge` | `addSecondaryEdge(ComparableNode source, ComparableNode target)`
`PhraseStructureNode` | `addTerminalNode()`
`PhraseStructureNode` | `addTerminalNode(int index)`
`void` | `clear()` Resets the structure.
`SortedSet<Edge>` | `getEdges()`
`int` | `getHighestNonTerminalIndex()`
`Set<Integer>` | `getNonTerminalIndices()`
`PhraseStructureNode` | `getNonTerminalNode(int index)`
`PhraseStructureNode` | `getPhraseStructureRoot()`
`PhraseStructureNode` | `getTerminalNode(int index)`
`boolean` | `hasNonTerminals()`
`boolean` | `isContinuous()`
`boolean` | `isContinuousExcludeTerminalsAttachToRoot()`
`int` | `nEdges()`
`int` | `nNonTerminals()`
`int` | `nTerminalNode()`
`void` | `removePhraseStructureEdge(PhraseStructureNode parent, PhraseStructureNode child)`
`void` | `removeSecondaryEdge(ComparableNode source, ComparableNode target)`
`String` | `toString()`
`String` | `toStringNonTerminalNode(NonTerminalNode node)`
`String` | `toStringTerminalNode(TokenNode node)`

Methods inherited from class org.maltparser.core.syntaxgraph.Sentence
`addTokenNode, addTokenNode, getHighestTokenIndex, getOrAddTerminalNode, getSentenceID, getTokenIndices, getTokenNode, hasTokens, nTokenNode, setSentenceID, update`

Methods inherited from class org.maltparser.core.syntaxgraph.SyntaxGraph
`addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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.LabeledStructure
`addLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTables`

Field Detail

### edgePool

    protected final ObjectPoolList<Edge> edgePool

### graphEdges

    protected final SortedSet<Edge> graphEdges

### nonTerminalNodes

    protected final SortedMap<Integer,NonTerminal> nonTerminalNodes

### nonTerminalPool

    protected final ObjectPoolList<NonTerminal> nonTerminalPool

### root

    protected final Root root

Constructor Detail

### PhraseStructureGraph

    public PhraseStructureGraph(SymbolTableHandler symbolTables)
                         throws MaltChainedException

Throws:
  `MaltChainedException`

Method Detail

### addTerminalNode

    public PhraseStructureNode addTerminalNode()
                                        throws MaltChainedException

  Specified by:
    `addTerminalNode` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### addTerminalNode

    public PhraseStructureNode addTerminalNode(int index)
                                        throws MaltChainedException

  Specified by:
    `addTerminalNode` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### getTerminalNode

    public PhraseStructureNode getTerminalNode(int index)

  Specified by:
    `getTerminalNode` in interface `PhraseStructure`

### nTerminalNode

    public int nTerminalNode()

  Specified by:
    `nTerminalNode` in interface `PhraseStructure`

### addNonTerminalNode

    public PhraseStructureNode addNonTerminalNode(int index)
                                           throws MaltChainedException

  Specified by:
    `addNonTerminalNode` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### addNonTerminalNode

    public PhraseStructureNode addNonTerminalNode()
                                           throws MaltChainedException

  Specified by:
    `addNonTerminalNode` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### getNonTerminalNode

    public PhraseStructureNode getNonTerminalNode(int index)
                                           throws MaltChainedException

  Specified by:
    `getNonTerminalNode` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### getHighestNonTerminalIndex

    public int getHighestNonTerminalIndex()

  Specified by:
    `getHighestNonTerminalIndex` in interface `PhraseStructure`

### getNonTerminalIndices

    public Set<Integer> getNonTerminalIndices()

  Specified by:
    `getNonTerminalIndices` in interface `PhraseStructure`

### hasNonTerminals

    public boolean hasNonTerminals()

  Specified by:
    `hasNonTerminals` in interface `PhraseStructure`

### nNonTerminals

    public int nNonTerminals()

  Specified by:
    `nNonTerminals` in interface `PhraseStructure`

### getPhraseStructureRoot

    public PhraseStructureNode getPhraseStructureRoot()

  Specified by:
    `getPhraseStructureRoot` in interface `PhraseStructure`

### addPhraseStructureEdge

    public Edge addPhraseStructureEdge(PhraseStructureNode parent,
                                       PhraseStructureNode child)
                                throws MaltChainedException

  Specified by:
    `addPhraseStructureEdge` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### removePhraseStructureEdge

    public void removePhraseStructureEdge(PhraseStructureNode parent,
                                          PhraseStructureNode child)
                                   throws MaltChainedException

  Specified by:
    `removePhraseStructureEdge` in interface `PhraseStructure`
  Throws:
    `MaltChainedException`

### addSecondaryEdge

    public Edge addSecondaryEdge(ComparableNode source,
                                 ComparableNode target)
                          throws MaltChainedException

  Specified by:
    `addSecondaryEdge` in interface `SecEdgeStructure`
  Throws:
    `MaltChainedException`

### removeSecondaryEdge

    public void removeSecondaryEdge(ComparableNode source,
                                    ComparableNode target)
                             throws MaltChainedException

  Specified by:
    `removeSecondaryEdge` in interface `SecEdgeStructure`
  Throws:
    `MaltChainedException`

### nEdges

    public int nEdges()

  Specified by:
    `nEdges` in interface `PhraseStructure`

### getEdges

    public SortedSet<Edge> getEdges()

### isContinuous

    public boolean isContinuous()

  Specified by:
    `isContinuous` in interface `PhraseStructure`

### isContinuousExcludeTerminalsAttachToRoot

    public boolean isContinuousExcludeTerminalsAttachToRoot()

  Specified by:
    `isContinuousExcludeTerminalsAttachToRoot` in interface `PhraseStructure`

### clear

    public void clear()
               throws MaltChainedException

  Description copied from interface: `Structure`
  Resets the structure.

  Specified by:
    `clear` in interface `Structure`
  Overrides:
    `clear` in class `Sentence`
  Throws:
    `MaltChainedException`

### toStringTerminalNode

    public String toStringTerminalNode(TokenNode node)

### toStringNonTerminalNode

    public String toStringNonTerminalNode(NonTerminalNode node)

### toString

    public String toString()

  Overrides:
    `toString` in class `Sentence`

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

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