Semantic Interpretation Markup

This section introduces semantic interpretation and describes how to use semantic interpretation markup in a grammar to customize the semantic values that the speech recognizer returns as the result of a successful recognition.

What Is Semantic Interpretation?

Semantic interpretation is the process by which a semantic interpreter generates a semantic result based on an utterance that matches a path through a grammar. A semantic result typically contains information that is more useful to the application than the text of the utterance. For example, a grammar for specifying an airport can recognize the utterance, "Heathrow Airport," and generate the airport code "LHR" as the semantic result. Scripts that are contained within tag elements and inserted in the input grammar generate the content of a semantic result. The speech recognizer serializes the products of the scripts and generates the semantic result in the form of a Semantic Markup Language (SML) output. For more information, see SML Output Overview.

The model and syntax of semantic interpretation that is implemented in the Microsoft recognition engines is based on Semantic Interpretation for Speech Recognition (SISR) Version 1.0.

Semantic Interpretation Principles

The basic principles for the semantic interpretation mechanism in the Microsoft speech recognition engines are:

  • Scripts that associate values with grammar rules generate semantic information.

  • Script expressions contained in the semantic interpretation tag element follow the syntax of ECMA-327. Not all features are supported. For exceptions, see Semantic Results Content.

  • The parse order of the rules in the grammar determines the order in which expressions are evaluated.

  • The semantic result (in the form of an SML output) consists of the semantic information associated with the root rule.

Semantic Interpretation Markup Reference

The following topics describe the implementation of semantic interpretation in Microsoft speech recognition engines.