se.lth.cs.nlp.nlputils.deptree
Class DepNode

java.lang.Object
  extended by se.lth.cs.nlp.nlputils.deptree.DepNode

public class DepNode
extends Object

A node in a dependency tree.

Author:
Richard Johansson (richard@cs.lth.se)

Field Summary
 DepNode[] children
          The children of this node.
 String features
          The "features" in CoNLL-X terminology.
 String lemma
          The lemma.
 DepNode parent
          The parent of this node.
 String pos
          The part of speech.
 String posFine
          The "fine" part-of-speech (in CoNLL-X terminology).
 int position
          The position of this node in the dependency graph.
 String relation
          The relation of this node to its parent.
 String word
          The word.
 
Constructor Summary
DepNode()
           
 
Method Summary
 int getSpanEnd()
          The position of the rightmost descendent of this node.
 int getSpanStart()
          The position of the leftmost descendent of this node.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

public DepNode parent
The parent of this node. Is null for the dummy root node.


children

public DepNode[] children
The children of this node.


relation

public String relation
The relation of this node to its parent.


word

public String word
The word.


pos

public String pos
The part of speech.


posFine

public String posFine
The "fine" part-of-speech (in CoNLL-X terminology).


features

public String features
The "features" in CoNLL-X terminology.


lemma

public String lemma
The lemma.


position

public int position
The position of this node in the dependency graph.

Constructor Detail

DepNode

public DepNode()
Method Detail

getSpanStart

public int getSpanStart()
The position of the leftmost descendent of this node.

Returns:
the position of the leftmost descendent of this node.

getSpanEnd

public int getSpanEnd()
The position of the rightmost descendent of this node.

Returns:
the position of the rightmost descendent of this node.

toString

public String toString()
Overrides:
toString in class Object