public class WordRelation extends Object
Modifier and Type | Field and Description |
---|---|
private Relation |
relation |
private TokenToWords |
tokenToWords |
Modifier | Constructor and Description |
---|---|
private |
WordRelation(Relation parentRelation,
TokenToWords tokenToWords) |
Modifier and Type | Method and Description |
---|---|
void |
addBreak()
Adds a break as a feature to the last item in the list.
|
void |
addWord(String word)
Adds a word as an Item to this WordRelation object.
|
static WordRelation |
createWordRelation(Utterance utterance,
TokenToWords tokenToWords)
Creates a WordRelation object with the given utterance and
TokenToWords.
|
Item |
getTail()
Returns the last item in this WordRelation.
|
void |
setLastWord(String word)
Sets the last Item in this WordRelation to the given word.
|
private TokenToWords tokenToWords
private WordRelation(Relation parentRelation, TokenToWords tokenToWords)
public static WordRelation createWordRelation(Utterance utterance, TokenToWords tokenToWords)
utterance
- the Utterance from which to create a RelationtokenToWords
- the TokenToWords object to usepublic void addBreak()
public void addWord(String word)
word
- the word to addpublic void setLastWord(String word)
word
- the word to setWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses