Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GrammarBuilder Constructor

Initializes a new instance of the GrammarBuilder class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method GrammarBuilder() Initializes a new, empty instance of the GrammarBuilder class.
Public method GrammarBuilder(Choices) Initializes a new instance of the GrammarBuilder class from a set of alternatives.
Public method GrammarBuilder(SemanticResultKey) Initializes a new instance of the GrammarBuilder class from a semantic key.
Public method GrammarBuilder(SemanticResultValue) Initializes a new instance of the GrammarBuilder class from a semantic value.
Public method GrammarBuilder(String) Initializes a new instance of the GrammarBuilder class from a sequence of words.
Public method GrammarBuilder(String, SubsetMatchingMode) Initializes a new instance of the GrammarBuilder class for a subset of a sequence of words.
Public method GrammarBuilder(GrammarBuilder, Int32, Int32) Initializes a new instance of the GrammarBuilder class from a repeated element.
Public method GrammarBuilder(String, Int32, Int32) Initializes a new instance of the GrammarBuilder class from the sequence of words in a String and specifies how many times the String can be repeated.
Top

Instances of this class can also be obtained by implicit conversions from other classes or by combining a GrammarBuilder object with a second object to from a new GrammarBuilder. For more information, see the Implicit and Addition methods.

To add constraints to an existing GrammarBuilder, use the Add, Append, AppendDictation, AppendRuleReference, and AppendWildcard methods, and the Addition operator.

Important note Important

The speech recognizer can throw an exception when using a speech recognition grammar that contains duplicate semantic elements with the same key name or multiple semantic elements that could repeatedly modify the value of the same semantic element. For more information about building a speech recognition grammar that contains semantic information, see Using SemanticResultKey and SemanticResultValue Objects.

For more information about building and using speech recognition grammars, see Speech Recognition and Creating GrammarBuilder Grammars.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.