java.lang.Objectucot.parser.Sentence
public class Sentence
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.
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 Word s
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 |
---|
private java.util.List<Word> words
Constructor Detail |
---|
public Sentence()
Method Detail |
---|
public void addWord(Word word)
Adds the given Word
into this Sentence
.
word
- Word
to add.public java.util.List<Word> getWords()
Returns all Word
s
held by this Sentence
in a List
.
List
of Word
s
of this Sentence
.public java.lang.String toString()
Returns textual representation of this
Sentence
.
The String
returned looks like:
{SENTENCE: (word 1)(word 2)(word 3)...}
toString
in class java.lang.Object