Important: The information in this document is obsolete and should not be used for new development.
SRNewLanguageModel
You can use theSRNewLanguageModel
function 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
TheSRNewLanguageModel
function returns, in themodel
parameter, a reference to a new language model associated with the recognition system specified by thesystem
parameter. The new language model is initially empty and has the name specified by thename
andnameLength
parameters. 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).
![]()
SRAddText
andSRAddLanguageObject
functions.SPECIAL CONSIDERATIONS
SRNewLanguageModel
sets the reference count of the specified language model to 1. You should call theSRReleaseObject
function to release the language model reference returned bySRNewLanguageModel
when you're done using it.SEE ALSO
You can get or set the name of an existing language model by calling theSRGetProperty
orSRSetProperty
functions with thekSRSpelling
property selector.