marytts.language.en
Class WordRelation

java.lang.Object
  extended by marytts.language.en.WordRelation

public class WordRelation
extends java.lang.Object

Helper class to add words and breaks into a Relation object.


Method Summary
 void addBreak()
          Adds a break as a feature to the last item in the list.
 void addWord(com.sun.speech.freetts.Item tokenItem, java.lang.String word)
          Adds a word as an Item to this WordRelation object.
static WordRelation createWordRelation(com.sun.speech.freetts.Utterance utterance, TokenToWords tokenToWords)
          Creates a WordRelation object with the given utterance and TokenToWords.
 com.sun.speech.freetts.Item getTail()
          Returns the last item in this WordRelation.
 void setLastWord(java.lang.String word)
          Sets the last Item in this WordRelation to the given word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createWordRelation

public static WordRelation createWordRelation(com.sun.speech.freetts.Utterance utterance,
                                              TokenToWords tokenToWords)
Creates a WordRelation object with the given utterance and TokenToWords.

Parameters:
utterance - the Utterance from which to create a Relation
tokenToWords - the TokenToWords object to use
Returns:
a WordRelation object

addBreak

public void addBreak()
Adds a break as a feature to the last item in the list.


addWord

public void addWord(com.sun.speech.freetts.Item tokenItem,
                    java.lang.String word)
Adds a word as an Item to this WordRelation object.

Parameters:
word - the word to add

setLastWord

public void setLastWord(java.lang.String word)
Sets the last Item in this WordRelation to the given word.

Parameters:
word - the word to set

getTail

public com.sun.speech.freetts.Item getTail()
Returns the last item in this WordRelation.

Returns:
the last item