Export (0) Print
Expand All

Grammar::StgInit Method

The StgInit method initializes a strongly-typed grammar.

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

protected:
void StgInit(
	array<Object^>^ parameters
)

Parameters

parameters
Type: array<System::Object>

Parameters to be passed to initialize the strongly-typed grammar.This parameter may be null.

A strongly-typed Grammar object (IsStg equals true) can return strongly-typed results (objects, rather than raw text) to a client application. For example, a strongly-typed grammar might return DataTime objects rather than raw recognized input.

You can implement strongly-typed grammars by attaching code to the rules of a grammar. As a recognition engine processes any given rule, taking as input the current partial results, the associated code is executed and the textual information becomes rich type objects. This allows a client to more easily make use of enhanced semantic checking, support for multiple cultures, and internal grammar logic.

Instances of strongly-typed Grammar objects are typically obtained from resources in an assembly as a Type of the Common Language Runtime (CLR). The localized types used to support different languages are examples of such Grammar objects.

Notes to Inheritors

If a strongly-typed grammar requires initialization, StgInit should be called in a constructor or an initialization method.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft