GRAMMAR Elements
The DEFINE tag contains a group of ID tags.
| syntax: |
<DEFINE >
</DEFINE> |
| content: |
eltOnly |
| order: |
many
(default) |
| parents: |
GRAMMAR |
| children: |
ID |
| attributes: |
(none) |
| model: |
open |
| source: |
<ElementType name="DEFINE" content="eltOnly" model="open">
<description>The DEFINE tag contains a group of ID tags.</description>
<element type="ID" minOccurs="1" maxOccurs="*"/>
</ElementType>
|
Specifies that the recognized phrase should match at least MIN and at most
MAX words from the dictation grammar. The DICTATION tag may contain an
associated semantic tag (name/value pair) which will be returned if the
DICTATION tag is recognized.
| syntax: |
<DICTATION
/> |
| content: |
empty |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
(none) |
| attributes: |
MAX,
MIN, PROPID,
PROPNAME |
| model: |
open |
| source: |
<ElementType name="DICTATION" content="empty" model="open">
<description>Specifies that the recognized phrase should match at least MIN and at most MAX words from the dictation grammar. The DICTATION tag may contain an associated semantic tag (name/value pair) which will be returned if the DICTATION tag is recognized.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="MIN"/>
<attribute type="MAX"/>
</ElementType>
|
The top-level XML element containing all other XML elements needed to
declare one Command and Control grammar.
| syntax: |
<GRAMMAR
>
</GRAMMAR> |
| content: |
eltOnly |
| order: |
many
(default) |
| parents: |
No parents found. This is
probably the document element. |
| children: |
DEFINE,
RULE |
| attributes: |
LANGID,
LEXDELIMITER,
WORDTYPE |
| model: |
closed |
| source: |
<ElementType name="GRAMMAR" content="eltOnly" model="closed">
<description>The top-level XML element containing all other XML elements needed to declare one Command and Control grammar.</description>
<attribute type="LANGID"/>
<attribute type="WORDTYPE"/>
<attribute type="LEXDELIMITER"/>
<element type="DEFINE" minOccurs="0" maxOccurs="1"/>
<element type="RULE" minOccurs="1" maxOccurs="*"/>
</ElementType>
|
The ID tag defines named constants for rule ID, property value, and property
ID elements.
| syntax: |
<ID
/> |
| content: |
empty |
| order: |
one |
| parents: |
DEFINE |
| children: |
(none) |
| attributes: |
NAME,
VAL |
| model: |
open |
| source: |
<ElementType name="ID" content="empty" model="open" order="one">
<description> The ID tag defines named constants for rule ID, property value, and property ID elements.</description>
<attribute type="NAME"/>
<attribute type="VAL"/>
</ElementType>
|
Defines an expression of alternate phrase recognitions. Each subelement
represents a possible separate recognition in place of this element. It is a
synonym of the LIST tag. Emply elements are not valid (i.e. the tag must
have children). The LIST element can define a default property name (PROPNAME)
or id (PROPID) which will be inherited by it's child PHRASE elements.
| syntax: |
<L
>
</L> |
| content: |
eltOnly |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
PROPID,
PROPNAME |
| model: |
open |
| source: |
<ElementType name="L" content="eltOnly" model="open">
<description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the LIST tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
Defines an expression of alternate phrase recognitions. Each subelement
represents a possible separate recognition in place of this element. It is a
synonym of the L tag. Emply elements are not valid (i.e. the tag must have
children). The LIST element can define a default property name (PROPNAME) or
id (PROPID) which will be inherited by it's child PHRASE elements.
| syntax: |
<LIST
>
</LIST> |
| content: |
eltOnly |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
PROPID,
PROPNAME |
| model: |
open |
| source: |
<ElementType name="LIST" content="eltOnly" model="open">
<description>Defines an expression of alternate phrase recognitions. Each subelement represents a possible separate recognition in place of this element. It is a synonym of the L tag. Emply elements are not valid (i.e. the tag must have children). The LIST element can define a default property name (PROPNAME) or id (PROPID) which will be inherited by it's child PHRASE elements.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
This element is similar to the P element. The only difference between the
PHRASE element and the OPT element is that the OPT element need not be
recognized for the rule to be fired. An associated property name and value
pair will be generated only if the contents of this element are recognized.
It is a synonym for the OPT tag.
| syntax: |
<O
>
</O> |
| content: |
mixed |
| order: |
many
(default) |
| parents: |
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
O, OPT,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
DISP,
MAX, MIN,
PRON, PROPID,
PROPNAME, VAL,
VALSTR, WEIGHT |
| model: |
open |
| source: |
<ElementType name="O" content="mixed" model="open">
<description>This element is similar to the P element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the OPT tag. </description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="VAL"/>
<attribute type="VALSTR"/>
<attribute type="PRON"/>
<attribute type="DISP"/>
<attribute type="MIN"/>
<attribute type="MAX"/>
<attribute type="WEIGHT"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="O" minOccurs="0" maxOccurs="*"/>
<element type="OPT" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
This element is similar to the PHRASE element. The only difference between
the PHRASE element and the OPT element is that the OPT element need not be
recognized for the rule to be fired. An associated property name and value
pair will be generated only if the contents of this element are recognized.
It is a synonym for the O tag.
| syntax: |
<OPT
>
</OPT> |
| content: |
mixed |
| order: |
many
(default) |
| parents: |
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
O, OPT,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
DISP,
MAX, MIN,
PRON, PROPID,
PROPNAME, VAL,
VALSTR, WEIGHT |
| model: |
open |
| source: |
<ElementType name="OPT" content="mixed" model="open">
<description>This element is similar to the PHRASE element. The only difference between the PHRASE element and the OPT element is that the OPT element need not be recognized for the rule to be fired. An associated property name and value pair will be generated only if the contents of this element are recognized. It is a synonym for the O tag.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="VAL"/>
<attribute type="VALSTR"/>
<attribute type="PRON"/>
<attribute type="DISP"/>
<attribute type="MIN"/>
<attribute type="MAX"/>
<attribute type="WEIGHT"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="O" minOccurs="0" maxOccurs="*"/>
<element type="OPT" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
This element is used to describe the Phrase element. It is a synonym of the
PHRASE element. An associated property name and value pair will be generated
only if the contents of this element are recognized. It is important to note
that a P empty element is not allowed.
| syntax: |
<P
>
</P> |
| content: |
mixed |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
O, OPT,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
DISP,
MAX, MIN,
PRON, PROPID,
PROPNAME, VAL,
VALSTR, WEIGHT |
| model: |
open |
| source: |
<ElementType name="P" content="mixed" model="open">
<description> This element is used to describe the Phrase element. It is a synonym of the PHRASE element. An associated property name and value pair will be generated only if the contents of this element are recognized. It is important to note that a P empty element is not allowed.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="VAL"/>
<attribute type="VALSTR"/>
<attribute type="PRON"/>
<attribute type="DISP"/>
<attribute type="MIN"/>
<attribute type="MAX"/>
<attribute type="WEIGHT"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="O" minOccurs="0" maxOccurs="*"/>
<element type="OPT" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
This element is used to describe the Phrase element. It is a synonym of the
P element. An associated property name and value pair will be generated only
if the contents of this element are recognized.It is important to note that
an empty PHRASE element is not allowed. Attributes may not be empty.
| syntax: |
<PHRASE
>
</PHRASE> |
| content: |
mixed |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
DICTATION,
L, LIST,
O, OPT,
P, PHRASE,
RULEREF, TEXTBUFFER,
WILDCARD |
| attributes: |
DISP,
MAX, MIN,
PRON, PROPID,
PROPNAME, VAL,
VALSTR, WEIGHT |
| model: |
open |
| source: |
<ElementType name="PHRASE" content="mixed" model="open">
<description> This element is used to describe the Phrase element. It is a synonym of the P element. An associated property name and value pair will be generated only if the contents of this element are recognized.It is important to note that an empty PHRASE element is not allowed. Attributes may not be empty.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="VAL"/>
<attribute type="VALSTR"/>
<attribute type="PRON"/>
<attribute type="DISP"/>
<attribute type="MIN"/>
<attribute type="MAX"/>
<attribute type="WEIGHT"/>
<element type="RULEREF" minOccurs="0" maxOccurs="*"/>
<element type="PHRASE" minOccurs="0" maxOccurs="*"/>
<element type="P" minOccurs="0" maxOccurs="*"/>
<element type="L" minOccurs="0" maxOccurs="*"/>
<element type="LIST" minOccurs="0" maxOccurs="*"/>
<element type="O" minOccurs="0" maxOccurs="*"/>
<element type="OPT" minOccurs="0" maxOccurs="*"/>
<element type="TEXTBUFFER" minOccurs="0" maxOccurs="*"/>
<element type="WILDCARD" minOccurs="0" maxOccurs="*"/>
<element type="DICTATION" minOccurs="0" maxOccurs="*"/>
</ElementType>
|
Specifies the grammar node is a grammar located in a standard Windows
Resource grammar.
| syntax: |
<RESOURCE
/> |
| content: |
empty |
| order: |
many
(default) |
| parents: |
RULE |
| children: |
(none) |
| attributes: |
NAME |
| model: |
open |
| source: |
<ElementType name="RESOURCE" content="empty" model="open">
<description> Specifies the grammar node is a grammar located in a standard Windows Resource grammar.</description>
<attribute type="NAME"/>
</ElementType>
|
This element describes the non-terminal RULE element. The contents must be
non-empty concatenated recognition contents. Left recursion is not legal in
a grammar. It is required that either the NAME or ID attribute is specified.
If both are specified, then they must agree. All RULE NAMEs and VALs should
be unique. Dynamic rules may not be exported.
| syntax: |
<RULE
>
</RULE> |
| content: |
eltOnly |
| order: |
many
(default) |
| parents: |
GRAMMAR |
| children: |
DICTATION,
L, LIST,
O, OPT,
P, PHRASE,
RESOURCE, RULEREF,
TEXTBUFFER, WILDCARD |
| attributes: |
DYNAMIC,
EXPORT, ID,
INTERPRETER,
NAME, TOPLEVEL |
| model: |
open |
| source: |
<ElementType name="RULE" content="eltOnly" model="open">
<description> This element describes the non-terminal RULE element. The contents must be non-empty concatenated recognition contents. Left recursion is not legal in a grammar. It is required that either the NAME or ID attribute is specified. If both are specified, then they must agree. All RULE NAMEs and VALs should be unique. Dynamic rules may not be exported.</description>
<attribute type="NAME"/>
<attribute type="ID"/>
<attribute type="TOPLEVEL"/>
<attribute type="EXPORT"/>
<attribute type="INTERPRETER"/>
<attribute type="DYNAMIC"/>
<group order="many" minOccurs="0" maxOccurs="*">
<element type="RULEREF"/>
<element type="PHRASE"/>
<element type="P"/>
<element type="L"/>
<element type="LIST"/>
<element type="O"/>
<element type="OPT"/>
<element type="TEXTBUFFER"/>
<element type="WILDCARD"/>
<element type="DICTATION"/>
<element type="RESOURCE"/>
</group>
</ElementType>
|
This element describes the RULEREF tag which is non-terminal. It is used
inside the contents of a rule definition (RULE) to reference another defined
rule. The RULEREF tag may contain a semantic property (name/value pair)
which will be returned if the rule is recognized.
| syntax: |
<RULEREF
/> |
| content: |
empty |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
(none) |
| attributes: |
NAME,
OBJECT, PROPID,
PROPNAME, REFID,
URL, VAL,
VALSTR, WEIGHT |
| model: |
open |
| source: |
<ElementType name="RULEREF" content="empty" model="open">
<description>This element describes the RULEREF tag which is non-terminal. It is used inside the contents of a rule definition (RULE) to reference another defined rule. The RULEREF tag may contain a semantic property (name/value pair) which will be returned if the rule is recognized.</description>
<attribute type="NAME"/>
<attribute type="REFID"/>
<attribute type="OBJECT"/>
<attribute type="URL"/>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="VAL"/>
<attribute type="VALSTR"/>
<attribute type="WEIGHT"/>
</ElementType>
|
Specifies the grammar is from a text buffer, to be specified at runtime by
the application. See also ISpRecoGrammar::SetWordSequenceData and
ISpRecoGrammar::SetTextSelection.
| syntax: |
<TEXTBUFFER
/> |
| content: |
empty |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
(none) |
| attributes: |
PROPID,
PROPNAME, WEIGHT |
| model: |
open |
| source: |
<ElementType name="TEXTBUFFER" content="empty" model="open">
<description>Specifies the grammar is from a text buffer, to be specified at runtime by the application. See also ISpRecoGrammar::SetWordSequenceData and ISpRecoGrammar::SetTextSelection.</description>
<attribute type="PROPNAME"/>
<attribute type="PROPID"/>
<attribute type="WEIGHT"/>
</ElementType>
|
Specifies a garbage word identifier for one or more non-silence sounds. The
garbage word may be recognized by the Speech Recognition engine, but will
NOT be returned to the application.
| syntax: |
<WILDCARD
/> |
| content: |
empty |
| order: |
many
(default) |
| parents: |
L, LIST,
O, OPT,
P, PHRASE,
RULE |
| children: |
(none) |
| attributes: |
(none) |
| model: |
open |
| source: |
<ElementType name="WILDCARD" content="empty" model="open">
<description>Specifies a garbage word identifier for one or more non-silence sounds. The garbage word may be recognized by the Speech Recognition engine, but will NOT be returned to the application.</description>
</ElementType>
|