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
Methods inherited from class org.maltparser.core.syntaxgraph.Sentence |
addTokenNode, addTokenNode, getHighestTokenIndex, getOrAddTerminalNode, getSentenceID, getTokenIndices, getTokenNode, hasTokens, nTokenNode, setSentenceID, update |
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
PhraseStructureGraph
public PhraseStructureGraph(SymbolTableHandler symbolTables)
throws MaltChainedException
- Throws:
MaltChainedException
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
Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.