sem.graph
Class Node

java.lang.Object
  extended by sem.graph.Node

public class Node
extends java.lang.Object

A node class for the dependency graph. It has a field for lemma and part-of-speech.


Constructor Summary
Node()
          Create a new node.
Node(java.lang.String lemma, java.lang.String pos)
          Create new node.
 
Method Summary
 Node clone()
          Create a new independent node with the same lemma and POS.
 java.lang.String getLabel()
          Get the combined representation of lemma and POS: lemma and POS joined by underscore (lemma_POS).
 java.lang.String getLemma()
          Get the lemma of this node.
 java.lang.String getPos()
          Get the POS of this node
 void print()
          Print the label to System.out.
 void setLemma(java.lang.String lemma)
          Set the lemma for this node.
 void setPos(java.lang.String pos)
          Set the POS for the node.
 java.lang.String toString()
          Get the string representation of this node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node()
Create a new node.


Node

public Node(java.lang.String lemma,
            java.lang.String pos)
Create new node.

Parameters:
lemma - Lemma
pos - Part-of-speech
Method Detail

getLemma

public java.lang.String getLemma()
Get the lemma of this node.

Returns:
Lemma

getPos

public java.lang.String getPos()
Get the POS of this node

Returns:
POS

getLabel

public java.lang.String getLabel()
Get the combined representation of lemma and POS: lemma and POS joined by underscore (lemma_POS).

Returns:
A label for this node.

print

public void print()
Print the label to System.out.


toString

public java.lang.String toString()
Get the string representation of this node. Returns the label.

Overrides:
toString in class java.lang.Object

setPos

public void setPos(java.lang.String pos)
Set the POS for the node.

Parameters:
pos - POS

setLemma

public void setLemma(java.lang.String lemma)
Set the lemma for this node.

Parameters:
lemma - Lemma

clone

public Node clone()
Create a new independent node with the same lemma and POS.

Overrides:
clone in class java.lang.Object