|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRuleComponent
RuleToken
public class RuleToken
Represents speakable text in a RuleGrammar
.
This is the primitive type of a RuleComponent
-
eventually any Rule
must break down
into a sequence of RuleToken
s that may be spoken.
This is also the primitive type of a RuleParse
.
RuleGrammar
,
RuleParse
Constructor Summary | |
---|---|
RuleToken(String text)
Constructs a RuleToken with the speakable text String . |
Method Summary | |
---|---|
String |
getText()
Gets the text of this RuleToken . |
String |
toString()
Returns a String representing this RuleComponent
as grammar text. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RuleToken(String text) throws IllegalArgumentException
text
String
.
Any white space in the text
is normalized:
For example,
" New York "
becomes "New York"
.
The String
format must conform to the grammar text conventions.
The text
corresponds to the written-form text used
in the Word
class.
text
- represents what can be said
IllegalArgumentException
- if the text
is null
or is not valid grammar textgetText
,
Word
getSupportsLetterToSound
when the vocabulary specified is not already present
within the Recognizer
Method Detail |
---|
public String getText()
RuleToken
.
The text corresponds to the written-form text used
in the Word
class.
RuleToken
Word
public String toString()
String
representing this RuleComponent
as grammar text.
The String
represents a portion of a grammar that could appear
on the right hand side of a Rule
definition.
toString
in class RuleComponent
String
representing grammar text.RuleComponent
,
Rule
|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.