class ClassLanguageModel

class ClassLanguageModel
  : public Grammar

Represents a list of grammars for dynamic grammar scenarios. Added in version 1.7.0.

ClassLanguageModels are only usable in specific scenarios and are not generally available.

Members

ClassLanguageModel

Syntax: public inline explicit ClassLanguageModel ( SPXGRAMMARHANDLE hgrammar );

Internal constructor. Creates a new instance using the provided handle.

Parameters

  • hgrammar Class Language Model handle.

AssignClass

Syntax: public template< > inline void AssignClass ( const std::string & className , std::shared_ptr< T > grammar );

Assigns a grammar to a class in the language mode.

Parameters

  • className Name of the class to assign the grammar to.

  • grammar Grammar to assign.

FromStorageId

Syntax: public inline static std::shared_ptr< ClassLanguageModel > FromStorageId ( const std::string & storageId );

Creates a class language model from a storage ID.

Parameters

  • storageId) The persisted storage ID of the language model.

Returns

The grammar list associated with the recognizer.

Creating a ClassLanguageModel from a storage ID is only usable in specific scenarios and is not generally available.