Important: The information in this document is obsolete and should not be used for new development.
SRNewLanguageModel
You can use theSRNewLanguageModelfunction to create a new language model.
pascal OSErr SRNewLanguageModel ( SRRecognitionSystem system, SRLanguageModel *model, const void *name, Size nameLength);
system- A recognition system.
model- On exit, a reference to a new empty language model associated with the specified recognition system.
name- The address of a buffer that contains the name of the language model. By convention, this name should begin with the character "<" and end with the character ">".
nameLength- The size, in bytes, of the specified name.
DESCRIPTION
TheSRNewLanguageModelfunction returns, in themodelparameter, a reference to a new language model associated with the recognition system specified by thesystemparameter. The new language model is initially empty and has the name specified by thenameandnameLengthparameters. The name of the language model should be unique among all the language models your application creates, and it should be comprehensible to users. (For example, a language model that defined a list of names might be called "<Names>").
You can add language objects (that is, words, phrases, paths, and other language models) to a language model by calling the
- Note
- The convention that language model names begin with the character "<" and end with the character ">" is adopted to support future utilities that display the names of language models to the user (perhaps as part of showing the user what he or she can say).
![]()
SRAddTextandSRAddLanguageObjectfunctions.SPECIAL CONSIDERATIONS
SRNewLanguageModelsets the reference count of the specified language model to 1. You should call theSRReleaseObjectfunction to release the language model reference returned bySRNewLanguageModelwhen you're done using it.SEE ALSO
You can get or set the name of an existing language model by calling theSRGetPropertyorSRSetPropertyfunctions with thekSRSpellingproperty selector.