Presentation is loading. Please wait.

Presentation is loading. Please wait.

ITCS 6010 XML Grammars. What is a Grammar? Specifies what can be said—all the possible sentences and phrases that can be recognized Includes entry via.

Similar presentations


Presentation on theme: "ITCS 6010 XML Grammars. What is a Grammar? Specifies what can be said—all the possible sentences and phrases that can be recognized Includes entry via."— Presentation transcript:

1 ITCS 6010 XML Grammars

2 What is a Grammar? Specifies what can be said—all the possible sentences and phrases that can be recognized Includes entry via speech or touchpad

3 XML Grammar Tags

4 <rule id = “string” scope = “string”/> Associates a legal rule expansion with a rulename Has two attributes id – name of rule; must be unique within grammar scope – has two options: public or private public – may be explicitly referenced by other grammars private – only directly accessible within containing grammar (default)

5 <item tag = “string” weight = “string”/> Defines an expression that can be uttered by user Has two attributes tag – value returned by recognizer if item matched weight – value indicates likelihood user will utter item Floating point value > 0

6 <one-of tag = “string”/> Defines set of alternative expressions Has one attribute tag – value returned if contained expression matched

7 <count number = “string”/> Defines # times contained expression can be uttered by user Has one attribute number – can have 4 values: 0+ - contained expressed may be uttered 0 or more times 1+ - contained expression may be uttered 1 or more times ? – contained expression optional optional – contained expression optional

8 <ruleref tag = “string” uri = “string”/> Defines a rule element Has two attributes tag – value returned by recognizer if ruleref matched uri – uri to a rule

9 (cont’d) uri can have special definitions - rule that is automatically matched without user uttering a word - a rule that can never be spoken - a rule that matches any speech up until next rule match/next token/end of spoken input

10 Grammar Example open close delete move the a window file menu


Download ppt "ITCS 6010 XML Grammars. What is a Grammar? Specifies what can be said—all the possible sentences and phrases that can be recognized Includes entry via."

Similar presentations


Ads by Google