CVMAlgorithmManager Class Reference

class CVMAlgorithmManager : public CBase

Algorithm manager to handle VocMan, Ttp and Grammar Compiler

NssDevAsr.lib
Since
2.8

Inherits from

Public Member Functions
~CVMAlgorithmManager()
voidAdaptVocabL(const CSIResultSet &, TInt)
voidCancel()
voidCombineGrammarL(const RPointerArray< CSICompiledGrammar > &, const RPointerArray< TSIRuleVariantInfo > &)
voidCompileGrammarL(CSICompiledGrammar &)
voidComputeNewGrammarSizeL(const CSIGrammar &, const TUint32, const TUint32, const RArray< TUint > &, RArray< TUint > &, TUint32 &)
voidGetEnginePropertiesL(const RArray< TInt > &, RArray< TInt > &)
voidLoadEnginePropertiesL(const RArray< TInt > &, const RArray< TInt > &)
HBufC8 *MathdoConfigurationData(TUint32, TUint32, TUint32, TUint32)
voidMathdoWordListReady(const TInt)
HBufC8 *MghdoConfigurationData(TUint32, TUint32, TUint32, TUint32)
voidMghdoGrammarCombinerComplete(HBufC8 *, TInt)
voidMghdoGrammarCompilerComplete(TInt)
CSILexicon *MghdoSILexiconL(TSILexiconID)
CVMAlgorithmManager *NewL(MDevASRObserver &, MVmAlgMgrObserver &)
TBool PruneGrammar(const CSIGrammar &, const TUint32, RArray< TSIRuleVariantInfo > &)
voidResolveResult(const RArray< TUint > &, CSIResultSet &, const RPointerArray< CSICompiledGrammar > &, const TDesC8 &)
voidTrainFromTextL(CSITtpWordList &, const RArray< TLanguage > &, const RArray< TUint32 > &)
Private Member Functions
CVMAlgorithmManager(MDevASRObserver &, MVmAlgMgrObserver &)
CVMAlgorithmManager(const CVMAlgorithmManager &)
voidConstructL()
CVMAlgorithmManager &operator=(const CVMAlgorithmManager &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CASRSGrCompilerHwDevice *iGrCompiler
TGrCompilerState iGrState
MDevASRObserver &iObserver
CASRSTtpHwDevice *iTtp
TTtpHwState iTtpState
MVmAlgMgrObserver &iVmAlgObserver
CASRSVocManHwDevice *iVocMan

Constructor & Destructor Documentation

CVMAlgorithmManager(MDevASRObserver &, MVmAlgMgrObserver &)

CVMAlgorithmManager(MDevASRObserver &aObserver,
MVmAlgMgrObserver &aVmObserver
)[private]

C++ default constructor.

Parameters

MDevASRObserver & aObserver
MVmAlgMgrObserver & aVmObserver

CVMAlgorithmManager(const CVMAlgorithmManager &)

CVMAlgorithmManager(const CVMAlgorithmManager &)[private]

Parameters

const CVMAlgorithmManager &

~CVMAlgorithmManager()

~CVMAlgorithmManager()[virtual]

Destructor.

Member Functions Documentation

AdaptVocabL(const CSIResultSet &, TInt)

voidAdaptVocabL(const CSIResultSet &aResultSet,
TIntaResultIndex
)

Use to adapt rule after recognition.

Since
2.8

Parameters

const CSIResultSet & aResultSet
TInt aResultIndex

Cancel()

voidCancel()

Cancels training.

Since
2.8

CombineGrammarL(const RPointerArray< CSICompiledGrammar > &, const RPointerArray< TSIRuleVariantInfo > &)

voidCombineGrammarL(const RPointerArray< CSICompiledGrammar > &aCompiledGrammars,
const RPointerArray< TSIRuleVariantInfo > &aExcludedRules
)

Invoked when grammar combining is needed

Since
2.8

Parameters

const RPointerArray< CSICompiledGrammar > & aCompiledGrammars
const RPointerArray< TSIRuleVariantInfo > & aExcludedRules

CompileGrammarL(CSICompiledGrammar &)

voidCompileGrammarL(CSICompiledGrammar &aGrammar)

Compiles SI or SD grammar to internal format.

Since
2.8

Parameters

CSICompiledGrammar & aGrammarReference to grammar object.

ComputeNewGrammarSizeL(const CSIGrammar &, const TUint32, const TUint32, const RArray< TUint > &, RArray< TUint > &, TUint32 &)

voidComputeNewGrammarSizeL(const CSIGrammar &aGrammar,
const TUint32aTargetNRuleVariants,
const TUint32aMaxNRuleVariants,
const RArray< TUint > &aNewRuleScores,
RArray< TUint > &aNNeNRuleVariants,
TUint32 &aNPrune
)

Computes number of rule variants for grammar.

Since
2.8

Parameters

const CSIGrammar & aGrammar
const TUint32 aTargetNRuleVariants
const TUint32 aMaxNRuleVariants
const RArray< TUint > & aNewRuleScores
RArray< TUint > & aNNeNRuleVariants
TUint32 & aNPrune

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

GetEnginePropertiesL(const RArray< TInt > &, RArray< TInt > &)

voidGetEnginePropertiesL(const RArray< TInt > &aPropertyId,
RArray< TInt > &aPropertyValue
)

Retreive the properties of the engines.

Since
2.0

Parameters

const RArray< TInt > & aPropertyId
RArray< TInt > & aPropertyValue

LoadEnginePropertiesL(const RArray< TInt > &, const RArray< TInt > &)

voidLoadEnginePropertiesL(const RArray< TInt > &aParameterId,
const RArray< TInt > &aParameterValue
)

Load the specified parameter(s) to the engines.

Parameters

const RArray< TInt > & aParameterId
const RArray< TInt > & aParameterValue

MathdoConfigurationData(TUint32, TUint32, TUint32, TUint32)

HBufC8 *MathdoConfigurationData(TUint32aPackageType,
TUint32aPackageID,
TUint32aStartPosition = 0,
TUint32aEndPosition =  KMaxTUint32
)

Callback function to load configuration data.

Parameters

TUint32 aPackageType
TUint32 aPackageID
TUint32 aStartPosition = 0
TUint32 aEndPosition =  KMaxTUint32

MathdoWordListReady(const TInt)

voidMathdoWordListReady(const TIntaError)

Callback function to notify that word list is converted.

Parameters

const TInt aError

MghdoConfigurationData(TUint32, TUint32, TUint32, TUint32)

HBufC8 *MghdoConfigurationData(TUint32aPackageType,
TUint32aPackageID,
TUint32aStartPosition = 0,
TUint32aEndPosition =  KMaxTUint32
)

Called when GrCompiler needs configuration data package

Parameters

TUint32 aPackageType
TUint32 aPackageID
TUint32 aStartPosition = 0
TUint32 aEndPosition =  KMaxTUint32

MghdoGrammarCombinerComplete(HBufC8 *, TInt)

voidMghdoGrammarCombinerComplete(HBufC8 *aResult,
TIntaError
)

Grammars have been combined.

Parameters

HBufC8 * aResult
TInt aError

MghdoGrammarCompilerComplete(TInt)

voidMghdoGrammarCompilerComplete(TIntaError)

Grammar has been compiled.

Parameters

TInt aError

MghdoSILexiconL(TSILexiconID)

CSILexicon *MghdoSILexiconL(TSILexiconIDanID)

Called when GrCompilerHwDevice needs an SI lexicon.

Parameters

TSILexiconID anID

NewL(MDevASRObserver &, MVmAlgMgrObserver &)

CVMAlgorithmManager *NewL(MDevASRObserver &aObserver,
MVmAlgMgrObserver &aVmObserver
)[static]

Two-phased constructor.

Parameters

MDevASRObserver & aObserver
MVmAlgMgrObserver & aVmObserver

PruneGrammar(const CSIGrammar &, const TUint32, RArray< TSIRuleVariantInfo > &)

TBool PruneGrammar(const CSIGrammar &aGrammar,
const TUint32aMinNumber,
RArray< TSIRuleVariantInfo > &aPrunedRuleVariants
)

Determines which rule variants can be removed.

Since
2.8

Parameters

const CSIGrammar & aGrammar
const TUint32 aMinNumber
RArray< TSIRuleVariantInfo > & aPrunedRuleVariants

ResolveResult(const RArray< TUint > &, CSIResultSet &, const RPointerArray< CSICompiledGrammar > &, const TDesC8 &)

voidResolveResult(const RArray< TUint > &aNBestIDs,
CSIResultSet &aSIResultSet,
const RPointerArray< CSICompiledGrammar > &aSICompiledGrammar,
const TDesC8 &aCombinedData
)

Resolves result using Grammar Compiler.

Since
2.8

Parameters

const RArray< TUint > & aNBestIDs
CSIResultSet & aSIResultSet
const RPointerArray< CSICompiledGrammar > & aSICompiledGrammar
const TDesC8 & aCombinedData

TrainFromTextL(CSITtpWordList &, const RArray< TLanguage > &, const RArray< TUint32 > &)

voidTrainFromTextL(CSITtpWordList &aWordList,
const RArray< TLanguage > &aDefaultLanguage,
const RArray< TUint32 > &aMaxNPronunsForWord
)

Starts training from text.

Since
2.8

Parameters

CSITtpWordList & aWordList
const RArray< TLanguage > & aDefaultLanguage
const RArray< TUint32 > & aMaxNPronunsForWord

operator=(const CVMAlgorithmManager &)

CVMAlgorithmManager &operator=(const CVMAlgorithmManager &)[private]

Parameters

const CVMAlgorithmManager &

Member Data Documentation

CASRSGrCompilerHwDevice * iGrCompiler

CASRSGrCompilerHwDevice *iGrCompiler[private]

TGrCompilerState iGrState

TGrCompilerState iGrState[private]

MDevASRObserver & iObserver

MDevASRObserver &iObserver[private]

CASRSTtpHwDevice * iTtp

CASRSTtpHwDevice *iTtp[private]

TTtpHwState iTtpState

TTtpHwState iTtpState[private]

MVmAlgMgrObserver & iVmAlgObserver

MVmAlgMgrObserver &iVmAlgObserver[private]

CASRSVocManHwDevice * iVocMan

CASRSVocManHwDevice *iVocMan[private]