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 ()
void AdaptVocabL (const CSIResultSet &, TInt )
void Cancel ()
void CombineGrammarL (const RPointerArray < CSICompiledGrammar > &, const RPointerArray < TSIRuleVariantInfo > &)
void CompileGrammarL ( CSICompiledGrammar &)
void ComputeNewGrammarSizeL (const CSIGrammar &, const TUint32 , const TUint32 , const RArray < TUint > &, RArray < TUint > &, TUint32 &)
void GetEnginePropertiesL (const RArray < TInt > &, RArray < TInt > &)
void LoadEnginePropertiesL (const RArray < TInt > &, const RArray < TInt > &)
HBufC8 * MathdoConfigurationData ( TUint32 , TUint32 , TUint32 , TUint32 )
void MathdoWordListReady (const TInt )
HBufC8 * MghdoConfigurationData ( TUint32 , TUint32 , TUint32 , TUint32 )
void MghdoGrammarCombinerComplete ( HBufC8 *, TInt )
void MghdoGrammarCompilerComplete ( TInt )
CSILexicon * MghdoSILexiconL ( TSILexiconID )
CVMAlgorithmManager * NewL ( MDevASRObserver &, MVmAlgMgrObserver &)
TBool PruneGrammar (const CSIGrammar &, const TUint32 , RArray < TSIRuleVariantInfo > &)
void ResolveResult (const RArray < TUint > &, CSIResultSet &, const RPointerArray < CSICompiledGrammar > &, const TDesC8 &)
void TrainFromTextL ( CSITtpWordList &, const RArray < TLanguage > &, const RArray < TUint32 > &)
Private Member Functions
CVMAlgorithmManager ( MDevASRObserver &, MVmAlgMgrObserver &)
CVMAlgorithmManager (const CVMAlgorithmManager &)
void ConstructL ()
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)

void AdaptVocabL ( const CSIResultSet & aResultSet,
TInt aResultIndex
)

Use to adapt rule after recognition.

Since
2.8

Parameters

const CSIResultSet & aResultSet
TInt aResultIndex

Cancel()

void Cancel ( )

Cancels training.

Since
2.8

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

void CombineGrammarL ( 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 &)

void CompileGrammarL ( CSICompiledGrammar & aGrammar )

Compiles SI or SD grammar to internal format.

Since
2.8

Parameters

CSICompiledGrammar & aGrammar Reference to grammar object.

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

void ComputeNewGrammarSizeL ( const CSIGrammar & aGrammar,
const TUint32 aTargetNRuleVariants,
const TUint32 aMaxNRuleVariants,
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()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

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

void GetEnginePropertiesL ( 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 > &)

void LoadEnginePropertiesL ( 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 ( TUint32 aPackageType,
TUint32 aPackageID,
TUint32 aStartPosition = 0,
TUint32 aEndPosition =  KMaxTUint32
)

Callback function to load configuration data.

Parameters

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

MathdoWordListReady(const TInt)

void MathdoWordListReady ( const TInt aError )

Callback function to notify that word list is converted.

Parameters

const TInt aError

MghdoConfigurationData(TUint32, TUint32, TUint32, TUint32)

HBufC8 * MghdoConfigurationData ( TUint32 aPackageType,
TUint32 aPackageID,
TUint32 aStartPosition = 0,
TUint32 aEndPosition =  KMaxTUint32
)

Called when GrCompiler needs configuration data package

Parameters

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

MghdoGrammarCombinerComplete(HBufC8 *, TInt)

void MghdoGrammarCombinerComplete ( HBufC8 * aResult,
TInt aError
)

Grammars have been combined.

Parameters

HBufC8 * aResult
TInt aError

MghdoGrammarCompilerComplete(TInt)

void MghdoGrammarCompilerComplete ( TInt aError )

Grammar has been compiled.

Parameters

TInt aError

MghdoSILexiconL(TSILexiconID)

CSILexicon * MghdoSILexiconL ( TSILexiconID anID )

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 TUint32 aMinNumber,
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 &)

void ResolveResult ( 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 > &)

void TrainFromTextL ( 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]