[RavenclawDev 224] swapping grammars for the ASR

Svetlana Stenchikova svetastenchikova at gmail.com
Wed Feb 21 22:37:37 EST 2007


Hi,  we are using JSGF grammars with sphinx 4 recognizer.
The grammar of sphinx 4 is generated by converting the grammar of the
phoenix parser.
We would like  to be able to swap Sphinx 4 grammars during the
runtime. This functionality is supported by sphinx 4.


One of the solutions that we consider is to modify the dialog system
specific part of the DM:  create execute agents that call
enable/disable grammars on the ASR and place these agents manually in
the dialog tree. This is not a good solution because there will be a
duplication between what is passed to ASR and what is set in the
GRAMMAR_MAPPING directive on the dialog manager.

Another idea is to use the implementation of the GRAMMAR_MAPPING
directive  to make a call to the ASR component notifying it to change
the grammar.
>From looking at the code  CMAExpect::DeclareExpectations and
CMARequest::DeclareExpectations, each agent has a list of expected
grammatical rules.

So, when an agent is activated(or executed) it could potentially make
a call to the ASR component to notify it of the grammar in the current
state of the DM and to enable the rules that should be active at this
point of the dialog.
This would ensure the synchrony between the DM grammar and the ASR
grammar. This requires a 1-to-1 mapping between phoenix and ASR
grammars, which we comply with because ASR grammar is a conversion
from phoenix grammar.

Can you please tell us what do you think of this idea?
This functionality is currently not present in ravenclaw, right?
How difficult would it be to implement this?
Could you please give any pointers or suggestions for the implementation?


Thank you

Svetlana


More information about the Ravenclaw-developers mailing list