Grammar Tag Formats

In an SRGS grammar, you may place pieces of data called tags anywhere in a grammar rule. When a rule is matched, the tag is returned in a parse tree along with the words spoken that caused the rule to match.

A common use for tags is to transform a speaker's utterance into data your application can understand. The speech engine is capable of manipulating the tags in your parse tree when they are in a format known as Semantic Interpretation for Speech Recognition (SISR). Examples can be found in the Introduction to Semantic Interpretation.

To perform any kind of interpretation, you must specify the format your tags are in. The following tag format specifiers are supported:

Tag-FormatDescription
semantics/1.0Use the SI script format of the SISR official recommendation, version 1.0 (adopted April 2007). See Strict SISR Compliance below for information on how a configuration setting can affect this for backward compatibility.
semantics/1.0-literalsUse the string literals format of the SISR official recommendation, version 1.0 (adopted April 2007). See Strict SISR Compliance below for information on how a configuration setting can affect this for backward compatibility.
semantics/1.0.2006Use the SI script format of the SISR official recommendation. Same as semantics/1.0 except that this is unaffected by the STRICT_SISR_COMPLIANCE setting described below.
semantics/1.0.2006-literalsUse the string literals format of the SISR official recommendation. Same as semantics/1.0-literals except that this is unaffected by the STRICT_SISR_COMPLIANCE setting described below.
lumenvox/1.0Use the Capacity Private Cloud-specific implementation of the 2003 SISR draft.

If the tag format of your grammar does not match one of these specifiers, the speech engine will not attempt to interpret your tags. You can still use the tag data in the parse tree to perform your own interpretation.

To specify the tag format in your grammar, use the following syntax:

ABNF

tag-format <semantics/1.0>;

XML

<grammar tag-format="semantics/1.0" ...>

Strict SISR Compliance

Prior to 2006, the platform had adopted the 2003 SISR draft as its only supported tag format. At that time, both semantics/1.0 and lumenvox/1.0 referred to the same implementation in the available engine versions.

As the specification evolved and gained industry adoption toward the end of 2006, the engine adopted the final SISR recommendation. Because semantics/1.0 was already in use to indicate the 2003 SISR draft, a new configuration setting (STRICT_SISR_COMPLIANCE) was introduced to allow backward compatibility. When disabled, STRICT_SISR_COMPLIANCE causes the engine to treat semantics/1.0 as the 2003 draft; when enabled, it treats semantics/1.0 as the final recommendation. With STRICT_SISR_COMPLIANCE disabled, you can still force final recommendation behavior by using semantics/1.0.2006 instead of semantics/1.0 (and similarly semantics/1.0.2006-literals instead of semantics/1.0-literals).

Starting with engine version 10.0.1019, the default value for STRICT_SISR_COMPLIANCE was set to 1 (enabled). Grammars specifying semantics/1.0 or semantics/1.0-literals will use the final SISR recommendation. If your grammars still require the 2003 SISR draft, either update your grammars to specify lumenvox/1.0 explicitly, or disable the STRICT_SISR_COMPLIANCE configuration setting.


Was this article helpful?