org.maltparser.core.syntaxgraph.node
Class NonTerminal
java.lang.Object
   java.util.Observable
java.util.Observable
       org.maltparser.core.syntaxgraph.GraphElement
org.maltparser.core.syntaxgraph.GraphElement
           org.maltparser.core.syntaxgraph.node.GraphNode
org.maltparser.core.syntaxgraph.node.GraphNode
               org.maltparser.core.syntaxgraph.node.NonTerminal
org.maltparser.core.syntaxgraph.node.NonTerminal
- All Implemented Interfaces: 
- Comparable<ComparableNode>, Element, ComparableNode, Node, NonTerminalNode, PhraseStructureNode
- public class NonTerminal 
- extends GraphNode- implements PhraseStructureNode, NonTerminalNode
 
 
 
 
 
| Methods inherited from class org.maltparser.core.syntaxgraph.GraphElement | 
| addLabel, addLabel, addLabel, compareTo, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph | 
 
 
 
 
| Methods inherited from interface org.maltparser.core.syntaxgraph.Element | 
| addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph | 
 
INDEX_OFFSET
public static final int INDEX_OFFSET
- See Also:
- Constant Field Values
children
protected final SortedSet<PhraseStructureNode> children
parent
protected PhraseStructureNode parent
index
protected int index
NonTerminal
public NonTerminal()
            throws MaltChainedException
- Throws:
- MaltChainedException
addIncomingEdge
public void addIncomingEdge(Edge in)
                     throws MaltChainedException
- 
- Specified by:
- addIncomingEdgein interface- Node
- Overrides:
- addIncomingEdgein class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
removeIncomingEdge
public void removeIncomingEdge(Edge in)
                        throws MaltChainedException
- 
- Specified by:
- removeIncomingEdgein interface- Node
- Overrides:
- removeIncomingEdgein class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
addOutgoingEdge
public void addOutgoingEdge(Edge out)
                     throws MaltChainedException
- 
- Specified by:
- addOutgoingEdgein interface- Node
- Overrides:
- addOutgoingEdgein class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
removeOutgoingEdge
public void removeOutgoingEdge(Edge out)
                        throws MaltChainedException
- 
- Specified by:
- removeOutgoingEdgein interface- Node
- Overrides:
- removeOutgoingEdgein class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
getParent
public PhraseStructureNode getParent()
- 
- Specified by:
- getParentin interface- PhraseStructureNode
 
- 
 
getParentEdge
public Edge getParentEdge()
                   throws MaltChainedException
- 
- Specified by:
- getParentEdgein interface- PhraseStructureNode
 
- 
- Throws:
- MaltChainedException
 
getParentEdgeLabelSymbol
public String getParentEdgeLabelSymbol(SymbolTable table)
                                throws MaltChainedException
- 
- Specified by:
- getParentEdgeLabelSymbolin interface- PhraseStructureNode
 
- 
- Throws:
- MaltChainedException
 
getParentEdgeLabelCode
public int getParentEdgeLabelCode(SymbolTable table)
                           throws MaltChainedException
- 
- Specified by:
- getParentEdgeLabelCodein interface- PhraseStructureNode
 
- 
- Throws:
- MaltChainedException
 
hasParentEdgeLabel
public boolean hasParentEdgeLabel(SymbolTable table)
                           throws MaltChainedException
- 
- Specified by:
- hasParentEdgeLabelin interface- PhraseStructureNode
 
- 
- Throws:
- MaltChainedException
 
getHeight
public int getHeight()
- 
- Specified by:
- getHeightin interface- NonTerminalNode
 
- 
 
getChildren
public SortedSet<PhraseStructureNode> getChildren()
- 
- Specified by:
- getChildrenin interface- NonTerminalNode
 
- 
 
getChild
public PhraseStructureNode getChild(int index)
- 
- Specified by:
- getChildin interface- NonTerminalNode
 
- 
 
getLeftChild
public PhraseStructureNode getLeftChild()
- 
- Specified by:
- getLeftChildin interface- NonTerminalNode
 
- 
 
getRightChild
public PhraseStructureNode getRightChild()
- 
- Specified by:
- getRightChildin interface- NonTerminalNode
 
- 
 
nChildren
public int nChildren()
- 
- Specified by:
- nChildrenin interface- NonTerminalNode
 
- 
 
hasNonTerminalChildren
public boolean hasNonTerminalChildren()
- 
- Specified by:
- hasNonTerminalChildrenin interface- NonTerminalNode
 
- 
 
hasTerminalChildren
public boolean hasTerminalChildren()
- 
- Specified by:
- hasTerminalChildrenin interface- NonTerminalNode
 
- 
 
getLexicalHead
public TokenNode getLexicalHead(HeadRules headRules)
                         throws MaltChainedException
- 
- Specified by:
- getLexicalHeadin interface- NonTerminalNode
 
- 
- Throws:
- MaltChainedException
 
getHeadChild
public PhraseStructureNode getHeadChild(HeadRules headRules)
                                 throws MaltChainedException
- 
- Specified by:
- getHeadChildin interface- NonTerminalNode
 
- 
- Throws:
- MaltChainedException
 
getLexicalHead
public TokenNode getLexicalHead()
                         throws MaltChainedException
- 
- Specified by:
- getLexicalHeadin interface- NonTerminalNode
 
- 
- Throws:
- MaltChainedException
 
getHeadChild
public PhraseStructureNode getHeadChild()
                                 throws MaltChainedException
- 
- Specified by:
- getHeadChildin interface- NonTerminalNode
 
- 
- Throws:
- MaltChainedException
 
identifyHead
public TokenNode identifyHead(HeadRules headRules)
                       throws MaltChainedException
- 
- Specified by:
- identifyHeadin interface- NonTerminalNode
 
- 
- Throws:
- MaltChainedException
 
getIndex
public int getIndex()
- Description copied from interface: ComparableNode
- Returns the index of the node.
 
- 
- Specified by:
- getIndexin interface- ComparableNode
- Specified by:
- getIndexin class- GraphNode
 
- 
- Returns:
- the index of the node.
 
getCompareToIndex
public int getCompareToIndex()
- Description copied from interface: ComparableNode
- Returns the index of the node (only used internal by compareTo).
 
- 
- Specified by:
- getCompareToIndexin interface- ComparableNode
 
- 
- Returns:
- the index of the node (only used internal by compareTo).
 
isContinuous
public boolean isContinuous()
- 
- Specified by:
- isContinuousin interface- NonTerminalNode
 
- 
 
isContinuousExcludeTerminalsAttachToRoot
public boolean isContinuousExcludeTerminalsAttachToRoot()
- 
- Specified by:
- isContinuousExcludeTerminalsAttachToRootin interface- NonTerminalNode
 
- 
 
isRoot
public boolean isRoot()
- Description copied from interface: ComparableNode
- Returns true if the node is a root node, otherwise false.
 
- 
- Specified by:
- isRootin interface- ComparableNode
- Specified by:
- isRootin class- GraphNode
 
- 
- Returns:
- true if the node is a root node, otherwise false.
 
getLeftmostProperDescendant
public ComparableNode getLeftmostProperDescendant()
- Description copied from interface: ComparableNode
- Returns the left-most proper terminal descendant node (excluding itself).
 
- 
- Specified by:
- getLeftmostProperDescendantin interface- ComparableNode
 
- 
- Returns:
- the left-most proper terminal descendant node.
 
getRightmostProperDescendant
public ComparableNode getRightmostProperDescendant()
- Description copied from interface: ComparableNode
- Returns the right-most proper terminal descendant node (excluding itself).
 
- 
- Specified by:
- getRightmostProperDescendantin interface- ComparableNode
 
- 
- Returns:
- the right-most proper terminal descendant node.
 
getLeftmostDescendant
public ComparableNode getLeftmostDescendant()
                                     throws MaltChainedException
- Description copied from interface: ComparableNode
- Returns the left-most terminal descendant node.
 
- 
- Specified by:
- getLeftmostDescendantin interface- ComparableNode
 
- 
- Returns:
- the left-most terminal descendant node.
- Throws:
- MaltChainedException
 
getRightmostDescendant
public ComparableNode getRightmostDescendant()
                                      throws MaltChainedException
- Description copied from interface: ComparableNode
- Returns the right-most terminal descendant node.
 
- 
- Specified by:
- getRightmostDescendantin interface- ComparableNode
 
- 
- Returns:
- the right-most terminal descendant node.
- Throws:
- MaltChainedException
 
setIndex
public void setIndex(int index)
              throws MaltChainedException
- 
- Specified by:
- setIndexin interface- Node
- Specified by:
- setIndexin class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
clear
public void clear()
           throws MaltChainedException
- Description copied from class: GraphElement
- Resets the graph element.
 
- 
- Specified by:
- clearin interface- Element
- Overrides:
- clearin class- GraphNode
 
- 
- Throws:
- MaltChainedException
 
compareTo
public int compareTo(ComparableNode o)
- 
- Specified by:
- compareToin interface- Comparable<ComparableNode>
- Overrides:
- compareToin class- GraphNode
 
- 
 
equals
public boolean equals(Object obj)
- 
- Overrides:
- equalsin class- GraphNode
 
- 
 
hashCode
public int hashCode()
- 
- Overrides:
- hashCodein class- GraphNode
 
- 
 
toString
public String toString()
- 
- Overrides:
- toStringin class- GraphNode
 
- 
 
Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.