Using Concept/Phrase Grammars

Note: As of July 2007, all functions relating to concept/phrase grammars have been deprecated in favor of SRGS grammars. These functions are subject to being removed in a future release. Please update your applications accordingly. See Using SRGS Grammars for more information on working with SRGS grammars.

These functions allow the ActiveX application to implement Phrase pair grammars.  These grammars are less powerful than SRGS grammars, but are easier to create.  

Public Sub AddConceptToGrammar(Concept As String, Phrase As String)

Public Function GetRawConceptCount() As Long

Public Function GetRawConcept(Index As Long, ByRef ConfidenceScore As Long) As String

Public Function IsCustomConcept(Concept As String) As Boolean

Public Function GetPhrase(Index As Long) As String

Public Sub SetAllowedNumberOfRecognitionReturns(FromCount As Long, ToCount As Long)

Syntax

LVCA.AddConceptToGrammar(Concept, Phrase)

Count = LVCA.GetRawConceptCount

RetConcept = LVCA.GetRawConcept( Index, ConfScore )

Custom = LVCA.IsCustomConcept(Concept)

Phrase = LVCA.GetPhrase(Index)

LVCA.SetAllowedNumberOfRecognitionReturns From, To

Arguments

Concept - String - Key identifier of phrases which all have the same effect in the application

Phrase - String - The actual utterance to be recognized.

Index - Long - The utterance order/position of the concept recognized.

ConfScore - Long(out) - This will contain the confidence score of the concept

From - Long - lower bound of how many concepts will be recognized

To - Long - upper bound of how many concepts will be recognized.

Returns

Count - Long - The number of concepts which were recognized in the utterance.

RetConcept - String - This is the concept found at position identified by Index.

Custom - Boolean - Was this concept added through the ActiveX application.

Phrase - String - The actual phrase identified at position Index

Appropriate Events

Enter Module

AddConceptToGrammar

SetAllowedNumberOfRecognitionReturns

After Decode

All others

Remarks

Concept/phrase pairs are unstructured.  As a result there is no control in the order of appearance.  If there are two concepts in a grammar "Yes" and "No", The caller could say "Yes .. NO",  The recognizer will return back 2 concepts the first being Yes and the Second would be no.  The number of concepts can be controlled by the SetAllowedNumberOf RecognitionReturns method.  If From was set to 1 and To was set to 1 then only "Yes" would be returned in this example.


Complete Help Topic List | Speech Platform Product Information