Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Comments in .grxml Grammar Files

The System.Speech supports grammar files that conform to the Speech Recognition Grammar Specification (SRGS) Version 1.0. It is an accepted convention to use the .grxml file extension for XML-based grammar documents that conform to the SRGS specification.

Comments in .grxml grammar files are enclosed between the string sequences <!-- and -->.


<!-- Grammar_rule_description -->




<?xml version="1.0" encoding="utf-8"?>
<grammar xml:lang="en-US" root="BlueGreen" tag-format="semantics/1.0" version="1.0" 

<!-- This rule recognizes the color names "blue", "indigo", "azure", "green", --> 
<!-- "teal", and "emerald", and returns the text of the recognized color and --> 
<!-- a semantic value. -->

  <rule id="BlueGreen" scope="public">
        <item> <ruleref uri="#Blue"/> <tag> out.color=rules.Blue; </tag> </item>
        <item> <ruleref uri="#Green"/> <tag> out.color=rules.Green; </tag> </item>

  <rule id="Blue" scope="public">
    <tag> out="blue"; </tag>
      <item> blue </item>
      <item> indigo </item>
      <item> azure </item>

  <rule id="Green" scope="public">
    <tag> out="green"; </tag>
      <item> green </item>
      <item> teal </item>
      <item> emerald </item>

© 2015 Microsoft