JSAPI 2.0

javax.speech.recognition
Class RuleSpecial

Object
  extended by RuleComponent
      extended by RuleSpecial

public class RuleSpecial
extends RuleComponent

Defines special RuleReferences defined as constants. The special RuleReferences GARBAGE, NULL and VOID may be used within RuleGrammar definitions as RuleComponents.

Special Rule references for SRGS are

See Also:
RuleGrammar, RuleReference

Field Summary
static RuleSpecial GARBAGE
          Special GARBAGE RuleComponent that may match any speech up until the next RuleComponent match, the next token, or until the end of spoken input.
static RuleSpecial NULL
          Special NULL RuleComponent that always matches.
static RuleSpecial VOID
          Special VOID RuleComponent that never matches.
 
Method Summary
 String toString()
          Returns a String representing this RuleComponent as grammar text.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GARBAGE

public static final RuleSpecial GARBAGE
Special GARBAGE RuleComponent that may match any speech up until the next RuleComponent match, the next token, or until the end of spoken input.

A RuleGrammar processor must accept RuleGrammars that contain GARBAGE. However, the behavior of GARBAGE is implementation-specific. A user agent should be capable of matching arbitrary spoken input up to the next token, but may treat GARBAGE as equivalent to NULL (match no spoken input).

See Also:
NULL, VOID, RuleGrammar

NULL

public static final RuleSpecial NULL
Special NULL RuleComponent that always matches. Unlike GARBAGE, the match succeeds independent of speech input.

See Also:
GARBAGE, VOID

VOID

public static final RuleSpecial VOID
Special VOID RuleComponent that never matches.

See Also:
GARBAGE, NULL
Method Detail

toString

public String toString()
Returns a 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.

Overrides:
toString in class RuleComponent
Returns:
printable String representing grammar text.
See Also:
RuleComponent, Rule

JSAPI 2.0

JavaTM Speech API 2.0, Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.

Free Web Hosting