ucot.parser
Class Sentence

java.lang.Object
  extended by ucot.parser.Sentence

public class Sentence
extends java.lang.Object

Contains information and words of one sentence. Sentence is builded from a list of words and words cary informaton about their part in the sentence and what part of the speech they represents etc.

Author:
panu

Field Summary
private  java.util.List<Word> words
           
 
Constructor Summary
Sentence()
           
 
Method Summary
 void addWord(Word word)
           Adds the given Word into this Sentence.
 java.util.List<Word> getWords()
           Returns all Words held by this Sentence in a List.
 java.lang.String toString()
           Returns textual representation of this Sentence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

words

private java.util.List<Word> words
Constructor Detail

Sentence

public Sentence()
Method Detail

addWord

public void addWord(Word word)

Adds the given Word into this Sentence.

Parameters:
word - Word to add.

getWords

public java.util.List<Word> getWords()

Returns all Words held by this Sentence in a List.

Returns:
List of Words of this Sentence.

toString

public java.lang.String toString()

Returns textual representation of this Sentence.

The String returned looks like:

{SENTENCE: (word 1)(word 2)(word 3)...}

Overrides:
toString in class java.lang.Object