![]() |
|
![]() ![]() ![]() |
Working with Grammars > Importing Grammar Files > Using External Grammars | |
![]() |
Using External Grammars |
When you use external grammars, you must create an interpretation and assign the interpretation to a property of the interpretation. When Dialog Designer generates grammars, it assigns the interpretation to the property "cxtag". The Dialog Designer runtime looks for this "cxtag" and stores it into the "value" field. If you do not define the "cxtag", the runtime extracts all properties from the interpretation as it does not know which one to use. This may lead to unexpected results. Therefore, you must add "cxtag" when you use the "value" field of the recognition result complex variable in external grammars.
For example, if you have a grammar that sets 2 tags:
<tag>ORDERNUM=.....;</tag>
<tag>PRICE=.....;</tag>
You need to define the slots ORDERNUM and PRICE so that the Dialog Designer runtime picks up these properties and stores them correctly. If you do not set the "cxtag" explicitly, the Dialog Designer runtime will iterate over the interpretation and set the "value" field to the concatenation of all the properties in the interpretation. With no "cxtag", the "value" field will contain both ORERNUM and PRICE in it. If you add <tag>cxtag=PRICE;</tag> to your grammar, then the "value" field will then contain PRICE .
If you do not wish to add the "cxtag" tag, then we recommend you not to use the "value" field.
![]() ![]() ![]() |
©2009, Avaya Inc. All rights reserved.
|