public class PhraseStructureGraph extends Sentence implements PhraseStructure
| Modifier and Type | Field and Description |
|---|---|
protected ObjectPoolList<Edge> |
edgePool |
protected java.util.SortedSet<Edge> |
graphEdges |
protected java.util.SortedMap<java.lang.Integer,NonTerminal> |
nonTerminalNodes |
protected ObjectPoolList<NonTerminal> |
nonTerminalPool |
protected Root |
root |
comments, sentenceID, terminalNodes, terminalPoollabelSetPool, numberOfComponents, symbolTables| Constructor and Description |
|---|
PhraseStructureGraph(SymbolTableHandler symbolTables) |
addComment, addTokenNode, addTokenNode, getComment, getHighestTokenIndex, getOrAddTerminalNode, getSentenceID, getTokenIndices, getTokenNode, hasComments, hasTokens, nTokenNode, setSentenceID, updateaddLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddComment, addTokenNode, addTokenNode, getComment, getHighestTokenIndex, getSentenceID, getTokenIndices, getTokenNode, hasComments, hasTokens, nTokenNode, setSentenceIDaddLabel, checkInLabelSet, checkOutNewLabelSet, getSymbolTables, setSymbolTablesprotected final ObjectPoolList<Edge> edgePool
protected final java.util.SortedSet<Edge> graphEdges
protected final java.util.SortedMap<java.lang.Integer,NonTerminal> nonTerminalNodes
protected final ObjectPoolList<NonTerminal> nonTerminalPool
public PhraseStructureGraph(SymbolTableHandler symbolTables) throws MaltChainedException
MaltChainedExceptionpublic PhraseStructureNode addTerminalNode() throws MaltChainedException
addTerminalNode in interface PhraseStructureMaltChainedExceptionpublic PhraseStructureNode addTerminalNode(int index) throws MaltChainedException
addTerminalNode in interface PhraseStructureMaltChainedExceptionpublic PhraseStructureNode getTerminalNode(int index)
getTerminalNode in interface PhraseStructurepublic int nTerminalNode()
nTerminalNode in interface PhraseStructurepublic PhraseStructureNode addNonTerminalNode(int index) throws MaltChainedException
addNonTerminalNode in interface PhraseStructureMaltChainedExceptionpublic PhraseStructureNode addNonTerminalNode() throws MaltChainedException
addNonTerminalNode in interface PhraseStructureMaltChainedExceptionpublic PhraseStructureNode getNonTerminalNode(int index) throws MaltChainedException
getNonTerminalNode in interface PhraseStructureMaltChainedExceptionpublic int getHighestNonTerminalIndex()
getHighestNonTerminalIndex in interface PhraseStructurepublic java.util.Set<java.lang.Integer> getNonTerminalIndices()
getNonTerminalIndices in interface PhraseStructurepublic boolean hasNonTerminals()
hasNonTerminals in interface PhraseStructurepublic int nNonTerminals()
nNonTerminals in interface PhraseStructurepublic PhraseStructureNode getPhraseStructureRoot()
getPhraseStructureRoot in interface PhraseStructurepublic Edge addPhraseStructureEdge(PhraseStructureNode parent, PhraseStructureNode child) throws MaltChainedException
addPhraseStructureEdge in interface PhraseStructureMaltChainedExceptionpublic void removePhraseStructureEdge(PhraseStructureNode parent, PhraseStructureNode child) throws MaltChainedException
removePhraseStructureEdge in interface PhraseStructureMaltChainedExceptionpublic Edge addSecondaryEdge(ComparableNode source, ComparableNode target) throws MaltChainedException
addSecondaryEdge in interface SecEdgeStructureMaltChainedExceptionpublic void removeSecondaryEdge(ComparableNode source, ComparableNode target) throws MaltChainedException
removeSecondaryEdge in interface SecEdgeStructureMaltChainedExceptionpublic int nEdges()
nEdges in interface PhraseStructurepublic boolean isContinuous()
isContinuous in interface PhraseStructurepublic boolean isContinuousExcludeTerminalsAttachToRoot()
isContinuousExcludeTerminalsAttachToRoot in interface PhraseStructurepublic void clear() throws MaltChainedException
LabeledStructureclear in interface LabeledStructureclear in class SentenceMaltChainedExceptionpublic java.lang.String toStringTerminalNode(TokenNode node)
public java.lang.String toStringNonTerminalNode(NonTerminalNode node)
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.