|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.maltparser.core.syntaxgraph.GraphElement
org.maltparser.core.syntaxgraph.node.GraphNode
org.maltparser.core.syntaxgraph.node.Root
public class Root
Field Summary | |
---|---|
protected SortedSet<PhraseStructureNode> |
children
|
protected DependencyNode |
component
a reference to a node where the node is part of a component. |
protected SortedSet<DependencyNode> |
leftDependents
|
protected int |
rank
|
protected SortedSet<DependencyNode> |
rightDependents
|
Fields inherited from class org.maltparser.core.syntaxgraph.node.GraphNode |
---|
incomingEdges, outgoingEdges |
Constructor Summary | |
---|---|
Root()
|
Method Summary | |
---|---|
void |
addHeadEdgeLabel(LabelSet labelSet)
|
void |
addHeadEdgeLabel(SymbolTable table,
int code)
|
void |
addHeadEdgeLabel(SymbolTable table,
String symbol)
|
void |
addIncomingEdge(Edge in)
|
void |
addOutgoingEdge(Edge out)
|
void |
clear()
Resets the graph element. |
int |
compareTo(ComparableNode o)
|
boolean |
equals(Object obj)
|
DependencyNode |
findComponent()
|
DependencyNode |
getAncestor()
|
PhraseStructureNode |
getChild(int index)
|
SortedSet<PhraseStructureNode> |
getChildren()
|
DependencyNode |
getClosestLeftDependent()
Returns the closest left dependent to the node it self, if not found null is returned. |
DependencyNode |
getClosestRightDependent()
Returns the closest right dependent to the node it self, if not found null is returned. |
int |
getCompareToIndex()
Returns the index of the node (only used internal by compareTo). |
DependencyNode |
getComponent()
|
protected void |
getDependencyDominationSet(SortedSet<DependencyNode> dominationSet)
|
int |
getDependencyNodeDepth()
Returns the depth of the node. |
DependencyNode |
getHead()
Returns the head dependency node if it exists, otherwise null. |
PhraseStructureNode |
getHeadChild()
|
PhraseStructureNode |
getHeadChild(HeadRules headRules)
|
Edge |
getHeadEdge()
Returns the edge between the head and the node if it exists, otherwise null. |
int |
getHeadEdgeLabelCode(SymbolTable table)
|
LabelSet |
getHeadEdgeLabelSet()
|
String |
getHeadEdgeLabelSymbol(SymbolTable table)
|
Set<SymbolTable> |
getHeadEdgeLabelTypes()
|
Set<Edge> |
getHeadEdges()
|
Set<DependencyNode> |
getHeads()
|
int |
getHeight()
|
int |
getIndex()
Returns the index of the node. |
PhraseStructureNode |
getLeftChild()
|
DependencyNode |
getLeftDependent(int index)
Returns the left dependent at the position index , where index==0 equals the left most dependent. |
int |
getLeftDependentCount()
Return the number of left dependents |
SortedSet<DependencyNode> |
getLeftDependents()
Returns a sorted set of left dependents. |
DependencyNode |
getLeftmostDependent()
|
ComparableNode |
getLeftmostDescendant()
Returns the left-most terminal descendant node. |
ComparableNode |
getLeftmostProperDescendant()
Returns the left-most proper terminal descendant node (excluding itself). |
DependencyNode |
getLeftSibling()
Returns the left sibling if it exists, otherwise null |
TokenNode |
getLexicalHead()
|
TokenNode |
getLexicalHead(HeadRules headRules)
|
PhraseStructureNode |
getParent()
|
Edge |
getParentEdge()
|
int |
getParentEdgeLabelCode(SymbolTable table)
|
String |
getParentEdgeLabelSymbol(SymbolTable table)
|
DependencyNode |
getProperAncestor()
|
int |
getRank()
|
PhraseStructureNode |
getRightChild()
|
DependencyNode |
getRightDependent(int index)
|
int |
getRightDependentCount()
Return the number of right dependents |
SortedSet<DependencyNode> |
getRightDependents()
Returns a sorted set of right dependents. |
DependencyNode |
getRightmostDependent()
|
ComparableNode |
getRightmostDescendant()
Returns the right-most terminal descendant node. |
ComparableNode |
getRightmostProperDescendant()
Returns the right-most proper terminal descendant node (excluding itself). |
DependencyNode |
getRightSibling()
Returns the right sibling if it exists, otherwise null |
DependencyNode |
getSameSideLeftSibling()
Returns the left sibling at the same side of head as the node it self. |
DependencyNode |
getSameSideRightSibling()
Returns the right sibling at the same side of head as the node it self. |
boolean |
hasAncestorInside(int left,
int right)
|
boolean |
hasAtMostOneHead()
Returns true if the node has at most one head, otherwise false. |
boolean |
hasDependent()
|
int |
hashCode()
|
boolean |
hasHead()
Returns true if the node has one or more head(s), otherwise false. |
boolean |
hasHeadEdgeLabel(SymbolTable table)
|
boolean |
hasLeftDependent()
Returns true if the node has one or more left dependents, otherwise false . |
boolean |
hasNonTerminalChildren()
|
boolean |
hasParentEdgeLabel(SymbolTable table)
|
boolean |
hasRightDependent()
Returns true if the node has one or more right dependents, otherwise false . |
boolean |
hasTerminalChildren()
|
TokenNode |
identifyHead(HeadRules headRules)
|
boolean |
isContinuous()
|
boolean |
isContinuousExcludeTerminalsAttachToRoot()
|
boolean |
isHeadEdgeLabeled()
|
boolean |
isProjective()
Returns true if the head edge is projective, otherwise false. |
boolean |
isRoot()
Returns true if the node is a root node, otherwise false. |
int |
nChildren()
|
int |
nHeadEdgeLabels()
|
void |
removeIncomingEdge(Edge in)
|
void |
removeOutgoingEdge(Edge out)
|
void |
setComponent(DependencyNode x)
|
void |
setIndex(int index)
|
void |
setRank(int r)
|
String |
toString()
|
Methods inherited from class org.maltparser.core.syntaxgraph.node.GraphNode |
---|
getIncomingEdgeIterator, getIncomingSecondaryEdges, getInDegree, getLeftmostDescendantIndex, getLeftmostProperDescendantIndex, getOutDegree, getOutgoingEdgeIterator, getOutgoingSecondaryEdges, getRightmostDescendantIndex, getRightmostProperDescendantIndex |
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 class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.maltparser.core.syntaxgraph.node.ComparableNode |
---|
getIncomingSecondaryEdges, getInDegree, getLeftmostDescendantIndex, getLeftmostProperDescendantIndex, getOutDegree, getOutgoingSecondaryEdges, getRightmostDescendantIndex, getRightmostProperDescendantIndex |
Methods inherited from interface org.maltparser.core.syntaxgraph.Element |
---|
addLabel, addLabel, addLabel, getBelongsToGraph, getLabelCode, getLabelSet, getLabelSymbol, getLabelTypes, hasLabel, isLabeled, nLabels, removeLabel, removeLabels, setBelongsToGraph |
Field Detail |
---|
protected final SortedSet<DependencyNode> leftDependents
protected final SortedSet<DependencyNode> rightDependents
protected final SortedSet<PhraseStructureNode> children
protected DependencyNode component
protected int rank
Constructor Detail |
---|
public Root() throws MaltChainedException
MaltChainedException
Method Detail |
---|
public void addIncomingEdge(Edge in) throws MaltChainedException
addIncomingEdge
in interface Node
addIncomingEdge
in class GraphNode
MaltChainedException
public void removeIncomingEdge(Edge in)
removeIncomingEdge
in interface Node
removeIncomingEdge
in class GraphNode
public void addOutgoingEdge(Edge out) throws MaltChainedException
addOutgoingEdge
in interface Node
addOutgoingEdge
in class GraphNode
MaltChainedException
public void removeOutgoingEdge(Edge out) throws MaltChainedException
removeOutgoingEdge
in interface Node
removeOutgoingEdge
in class GraphNode
MaltChainedException
public DependencyNode getAncestor() throws MaltChainedException
getAncestor
in interface DependencyNode
MaltChainedException
public DependencyNode getProperAncestor() throws MaltChainedException
getProperAncestor
in interface DependencyNode
MaltChainedException
public int getRank()
getRank
in interface DependencyNode
public void setRank(int r)
setRank
in interface DependencyNode
public DependencyNode findComponent()
findComponent
in interface DependencyNode
public DependencyNode getComponent()
getComponent
in interface DependencyNode
public void setComponent(DependencyNode x)
setComponent
in interface DependencyNode
public boolean isContinuous()
isContinuous
in interface NonTerminalNode
public boolean isContinuousExcludeTerminalsAttachToRoot()
isContinuousExcludeTerminalsAttachToRoot
in interface NonTerminalNode
public PhraseStructureNode getParent()
getParent
in interface PhraseStructureNode
public Edge getParentEdge() throws MaltChainedException
getParentEdge
in interface PhraseStructureNode
MaltChainedException
public String getParentEdgeLabelSymbol(SymbolTable table) throws MaltChainedException
getParentEdgeLabelSymbol
in interface PhraseStructureNode
MaltChainedException
public int getParentEdgeLabelCode(SymbolTable table) throws MaltChainedException
getParentEdgeLabelCode
in interface PhraseStructureNode
MaltChainedException
public boolean hasParentEdgeLabel(SymbolTable table) throws MaltChainedException
hasParentEdgeLabel
in interface PhraseStructureNode
MaltChainedException
public SortedSet<PhraseStructureNode> getChildren()
getChildren
in interface NonTerminalNode
public PhraseStructureNode getChild(int index)
getChild
in interface NonTerminalNode
public PhraseStructureNode getLeftChild()
getLeftChild
in interface NonTerminalNode
public PhraseStructureNode getRightChild()
getRightChild
in interface NonTerminalNode
public int nChildren()
nChildren
in interface NonTerminalNode
public boolean hasNonTerminalChildren()
hasNonTerminalChildren
in interface NonTerminalNode
public boolean hasTerminalChildren()
hasTerminalChildren
in interface NonTerminalNode
public int getHeight()
getHeight
in interface NonTerminalNode
public TokenNode getLexicalHead(HeadRules headRules) throws MaltChainedException
getLexicalHead
in interface NonTerminalNode
MaltChainedException
public PhraseStructureNode getHeadChild(HeadRules headRules) throws MaltChainedException
getHeadChild
in interface NonTerminalNode
MaltChainedException
public TokenNode getLexicalHead() throws MaltChainedException
getLexicalHead
in interface NonTerminalNode
MaltChainedException
public PhraseStructureNode getHeadChild() throws MaltChainedException
getHeadChild
in interface NonTerminalNode
MaltChainedException
public TokenNode identifyHead(HeadRules headRules) throws MaltChainedException
identifyHead
in interface NonTerminalNode
MaltChainedException
public boolean hasAtMostOneHead()
DependencyNode
hasAtMostOneHead
in interface DependencyNode
public boolean hasAncestorInside(int left, int right) throws MaltChainedException
hasAncestorInside
in interface DependencyNode
MaltChainedException
public boolean hasHead()
DependencyNode
hasHead
in interface DependencyNode
public DependencyNode getHead() throws MaltChainedException
DependencyNode
getHead
in interface DependencyNode
MaltChainedException
public Edge getHeadEdge() throws MaltChainedException
DependencyNode
getHeadEdge
in interface DependencyNode
MaltChainedException
public void addHeadEdgeLabel(SymbolTable table, String symbol) throws MaltChainedException
addHeadEdgeLabel
in interface DependencyNode
MaltChainedException
public void addHeadEdgeLabel(SymbolTable table, int code) throws MaltChainedException
addHeadEdgeLabel
in interface DependencyNode
MaltChainedException
public void addHeadEdgeLabel(LabelSet labelSet) throws MaltChainedException
addHeadEdgeLabel
in interface DependencyNode
MaltChainedException
public int getHeadEdgeLabelCode(SymbolTable table) throws MaltChainedException
getHeadEdgeLabelCode
in interface DependencyNode
MaltChainedException
public LabelSet getHeadEdgeLabelSet() throws MaltChainedException
getHeadEdgeLabelSet
in interface DependencyNode
MaltChainedException
public String getHeadEdgeLabelSymbol(SymbolTable table) throws MaltChainedException
getHeadEdgeLabelSymbol
in interface DependencyNode
MaltChainedException
public Set<SymbolTable> getHeadEdgeLabelTypes() throws MaltChainedException
getHeadEdgeLabelTypes
in interface DependencyNode
MaltChainedException
public boolean hasHeadEdgeLabel(SymbolTable table) throws MaltChainedException
hasHeadEdgeLabel
in interface DependencyNode
MaltChainedException
public boolean isHeadEdgeLabeled() throws MaltChainedException
isHeadEdgeLabeled
in interface DependencyNode
MaltChainedException
public int nHeadEdgeLabels() throws MaltChainedException
nHeadEdgeLabels
in interface DependencyNode
MaltChainedException
public Set<Edge> getHeadEdges() throws MaltChainedException
getHeadEdges
in interface DependencyNode
MaltChainedException
public Set<DependencyNode> getHeads() throws MaltChainedException
getHeads
in interface DependencyNode
MaltChainedException
public boolean hasDependent()
hasDependent
in interface DependencyNode
public boolean hasLeftDependent()
true
if the node has one or more left dependents, otherwise false
.
hasLeftDependent
in interface DependencyNode
true
if the node has one or more left dependents, otherwise false
.public DependencyNode getLeftDependent(int index)
index
, where index==0
equals the left most dependent.
getLeftDependent
in interface DependencyNode
index
- the index
index
, where index==0
equals the left most dependentpublic int getLeftDependentCount()
getLeftDependentCount
in interface DependencyNode
public SortedSet<DependencyNode> getLeftDependents()
DependencyNode
getLeftDependents
in interface DependencyNode
public DependencyNode getLeftSibling() throws MaltChainedException
null
getLeftSibling
in interface DependencyNode
null
MaltChainedException
public DependencyNode getSameSideLeftSibling() throws MaltChainedException
null
getSameSideLeftSibling
in interface DependencyNode
null
Throws:
MaltChainedException
public DependencyNode getClosestLeftDependent()
null
is returned.
getClosestLeftDependent
in interface DependencyNode
null
is returned.public DependencyNode getLeftmostDependent()
getLeftmostDependent
in interface DependencyNode
public DependencyNode getRightDependent(int index)
getRightDependent
in interface DependencyNode
public int getRightDependentCount()
getRightDependentCount
in interface DependencyNode
public SortedSet<DependencyNode> getRightDependents()
DependencyNode
getRightDependents
in interface DependencyNode
public DependencyNode getRightSibling() throws MaltChainedException
null
getRightSibling
in interface DependencyNode
null
MaltChainedException
public DependencyNode getSameSideRightSibling() throws MaltChainedException
null
getSameSideRightSibling
in interface DependencyNode
null
Throws:
MaltChainedException
public DependencyNode getClosestRightDependent()
null
is returned.
getClosestRightDependent
in interface DependencyNode
null
is returned.public DependencyNode getRightmostDependent()
getRightmostDependent
in interface DependencyNode
public boolean hasRightDependent()
true
if the node has one or more right dependents, otherwise false
.
hasRightDependent
in interface DependencyNode
true
if the node has one or more right dependents, otherwise false
.protected void getDependencyDominationSet(SortedSet<DependencyNode> dominationSet)
public boolean isProjective() throws MaltChainedException
DependencyNode
isProjective
in interface DependencyNode
MaltChainedException
public int getDependencyNodeDepth() throws MaltChainedException
DependencyNode
getDependencyNodeDepth
in interface DependencyNode
MaltChainedException
public int getIndex()
ComparableNode
getIndex
in interface ComparableNode
getIndex
in class GraphNode
public int getCompareToIndex()
ComparableNode
getCompareToIndex
in interface ComparableNode
public boolean isRoot()
ComparableNode
isRoot
in interface ComparableNode
isRoot
in class GraphNode
public ComparableNode getLeftmostProperDescendant() throws MaltChainedException
ComparableNode
getLeftmostProperDescendant
in interface ComparableNode
MaltChainedException
public ComparableNode getRightmostProperDescendant() throws MaltChainedException
ComparableNode
getRightmostProperDescendant
in interface ComparableNode
MaltChainedException
public ComparableNode getLeftmostDescendant() throws MaltChainedException
ComparableNode
getLeftmostDescendant
in interface ComparableNode
MaltChainedException
public ComparableNode getRightmostDescendant() throws MaltChainedException
ComparableNode
getRightmostDescendant
in interface ComparableNode
MaltChainedException
public void setIndex(int index) throws MaltChainedException
setIndex
in interface Node
setIndex
in class GraphNode
MaltChainedException
public void clear() throws MaltChainedException
GraphElement
clear
in interface Element
clear
in class GraphNode
MaltChainedException
public int compareTo(ComparableNode o)
compareTo
in interface Comparable<ComparableNode>
compareTo
in class GraphNode
public boolean equals(Object obj)
equals
in class GraphNode
public int hashCode()
hashCode
in class GraphNode
public String toString()
toString
in class GraphNode
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |