org.finetracker
Class Node

java.lang.Object
  extended by org.finetracker.Node

public class Node
extends java.lang.Object

This class represents a node in the lexicon. A node contains a FeatureVector, references to subnodes and possibly a lexical word. Also the depth of this node in the lexicon is stored.

Author:
Frank Kusters, Albert Gerritsen

Constructor Summary
Node()
           
 
Method Summary
 void addWord(Word word)
          Add a Word to this Node.
 FeatureVector getFeatureVector()
          Gets the FeatureVector.
 java.lang.String getLexicalWord()
          Gets the lexicalWord.
 LMExtension getLM()
          Use this method to get the LMExtension used to access the LM-penalties
 java.util.Set<Node> getNodes()
          Gets the subnodes of this Node in the lexicon.
static void setRootNode(Node rootNode)
          Sets the rootNode.
 java.lang.String toString()
          Creates a string representation of this node and all its subnodes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node()
Method Detail

getLM

public LMExtension getLM()
Use this method to get the LMExtension used to access the LM-penalties

Returns:
The correct LMExtension

setRootNode

public static void setRootNode(Node rootNode)
Sets the rootNode.

Parameters:
rootNode - the rootNode to set
See Also:
rootNode

addWord

public void addWord(Word word)
Add a Word to this Node. This function is called from outside this class only for the root node. It calls the private function addWord(Word,int) with a depth of 0.

Parameters:
word - the Word to be added

getFeatureVector

public FeatureVector getFeatureVector()
Gets the FeatureVector.

Returns:
the FeatureVector

getLexicalWord

public java.lang.String getLexicalWord()
Gets the lexicalWord.

Returns:
the lexicalWord

getNodes

public java.util.Set<Node> getNodes()
Gets the subnodes of this Node in the lexicon.

Returns:
the nodes

toString

public java.lang.String toString()
Creates a string representation of this node and all its subnodes.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()