|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.support.RiUtteranceTokenizer
public class RiUtteranceTokenizer
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_POSTPUNCTUATION_SYMBOLS
A string containing the default post-punctuation characters. |
static java.lang.String |
DEFAULT_PREPUNCTUATION_SYMBOLS
A string containing the default pre-punctuation characters. |
static java.lang.String |
DEFAULT_SINGLE_CHAR_SYMBOLS
A string containing the default single characters. |
static java.lang.String |
DEFAULT_WHITESPACE_SYMBOLS
A string containing the default whitespace characters. |
static int |
EOF
A constant indicating that the end of the stream has been read. |
| Constructor Summary | |
|---|---|
RiUtteranceTokenizer()
Constructs a Tokenizer. |
|
RiUtteranceTokenizer(java.io.Reader file)
Creates a tokenizer that will return tokens from the given file. |
|
RiUtteranceTokenizer(java.lang.String string)
Creates a tokenizer that will return tokens from the given string. |
|
| Method Summary | |
|---|---|
java.lang.String |
getErrorDescription()
if hasErrors returns true, this will return a description of
the error encountered, otherwise it will return null |
com.sun.speech.freetts.Token |
getNextToken()
Returns the next token. |
boolean |
hasErrors()
Returns true if there were errors while reading tokens |
boolean |
hasMoreTokens()
Returns true if there are more tokens, false
otherwise. |
boolean |
isBreak()
Determines if the current token should start a new sentence. |
void |
setInputReader(java.io.Reader reader)
Sets the input reader |
void |
setInputText(java.lang.String inputString)
Sets the text to tokenize. |
void |
setPostpunctuationSymbols(java.lang.String symbols)
Sets the postpunctuation symbols of this Tokenizer to the given symbols. |
void |
setPrepunctuationSymbols(java.lang.String symbols)
Sets the prepunctuation symbols of this Tokenizer to the given symbols. |
void |
setSingleCharSymbols(java.lang.String symbols)
Sets the single character symbols of this Tokenizer to the given symbols. |
void |
setWhitespaceSymbols(java.lang.String symbols)
Sets the whitespace symbols of this Tokenizer to the given symbols. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EOF
public static final java.lang.String DEFAULT_WHITESPACE_SYMBOLS
public static final java.lang.String DEFAULT_SINGLE_CHAR_SYMBOLS
public static final java.lang.String DEFAULT_PREPUNCTUATION_SYMBOLS
public static final java.lang.String DEFAULT_POSTPUNCTUATION_SYMBOLS
| Constructor Detail |
|---|
public RiUtteranceTokenizer()
public RiUtteranceTokenizer(java.lang.String string)
string - the string to tokenizepublic RiUtteranceTokenizer(java.io.Reader file)
file - where to read the input from| Method Detail |
|---|
public void setWhitespaceSymbols(java.lang.String symbols)
setWhitespaceSymbols in interface com.sun.speech.freetts.Tokenizersymbols - the whitespace symbolspublic void setSingleCharSymbols(java.lang.String symbols)
setSingleCharSymbols in interface com.sun.speech.freetts.Tokenizersymbols - the single character symbolspublic void setPrepunctuationSymbols(java.lang.String symbols)
setPrepunctuationSymbols in interface com.sun.speech.freetts.Tokenizersymbols - the prepunctuation symbolspublic void setPostpunctuationSymbols(java.lang.String symbols)
setPostpunctuationSymbols in interface com.sun.speech.freetts.Tokenizersymbols - the postpunctuation symbolspublic void setInputText(java.lang.String inputString)
setInputText in interface com.sun.speech.freetts.TokenizerinputString - the string to tokenizepublic void setInputReader(java.io.Reader reader)
setInputReader in interface com.sun.speech.freetts.Tokenizerreader - the input sourcepublic com.sun.speech.freetts.Token getNextToken()
getNextToken in interface com.sun.speech.freetts.Tokenizernull if no more tokenspublic boolean hasMoreTokens()
true if there are more tokens, false
otherwise.
hasMoreTokens in interface com.sun.speech.freetts.Tokenizertrue if there are more tokens false
otherwisepublic boolean hasErrors()
true if there were errors while reading tokens
hasErrors in interface com.sun.speech.freetts.Tokenizertrue if there were errors; false
otherwisepublic java.lang.String getErrorDescription()
true, this will return a description of
the error encountered, otherwise it will return null
getErrorDescription in interface com.sun.speech.freetts.Tokenizerpublic boolean isBreak()
isBreak in interface com.sun.speech.freetts.Tokenizertrue if a new sentence should be started
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||