| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
MYRULE [
[cheddar] {<MySlot "cheddar cheese">}
(monteray jack) {<MySlot "jack cheese">}
(stinky french cheese) {<MySlot "stinky cheese">}
]
<?xml version= "1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar"
xml:lang="en-US" root = "MYRULE">
<rule id="MYRULE">
<one-of>
<item> cheddar <tag>out.MySlot="cheddar cheese";</tag> </item>
<item> monteray jack <tag>out.MySlot="jack cheese";</tag> </item>
<item> stinky french cheese <tag>out.MySlot="stinky cheese";</tag> </item>
</one-of>
</rule>
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<form id="Queso">
<field name="F_1" slot="MySlot">
<grammar src="XMLGrammarSlots.xml" type="application/grammar-xml"/>
<prompt>
What is your favorite kind of cheese?
</prompt>
<filled namelist="F_1$.interpretation.MySlot">
<prompt>
you said that your favorite cheese is
<break/>
<value expr="lastresult$.interpretation.MySlot"/>
</prompt>
<log expr="'*** INTERPRETATION RESULT = ' + lastresult$.interpretation.MySlot"/>
</filled>
</field>
</form>
</vxml>
| ACCOUNT LOGIN |
| ANNOTATIONS: EXISTING POSTS |
Khamyl
|
|
| Hi,
Two examples above are not equal if we consider the optional and repeat operator in GSL format. Are they? How should grXML formated grammar look like if we want it to be equivalent with GSL format considering operators. Thank you. Khamyl |
|
MattHenry
|
|
|
Hello Khamyl, You are indeed correct. Apologies if this slight misrepresentation caused any confusion. I'll see that this is corrected in the next Build of the VXML docs. ~Matthew Henry |
|
lily
|
|
| I used the converter to convert the gsl grammar to the grXML one. The way to get the slots are really different, in the beginning they create a function to be able to get the slots. Is there an easier way like in the gsl one?
When I used the example you provided for the grXML it didn't work out. Thanks! |
|
VoxeoTony
|
|
| Hello,
You spoke of a converter, unfortunately, I'm not entirely sure of what converter you are referring to in your posting. We do also see that you are looking to continue the process of getting the grXML grammar slot functionality to work. We would want to know more information about this tutorial not working for you. It was tested stringently prior to being published on the tutorials page. In addition, I ran a follow up test to be sure it was operational. However, this doesn't mean that you aren't experiencing issues. We would like to offer you the opportunity to create an account ticket under your account in order for us to help troubleshoot this issue with you. Having the account ticket open will allow you to send us the logging data that would be paramount in our discovery efforts without compromising personal information. Cheers, Tony |
|
sambhav
|
|
| Hello everyone
I should say, a great place to learn VXML. I am newbie and exploring about VXML. I have query about grammar specifications. what is difference when we use grxml, ABNF form and JSGF?pros and cons? are latter two deprecated? Thanks :-) |
|
VoxeoBrian
|
|
| Hello,
Glad to hear you are making strides to learn VoiceXML and you are finding our documentation and environment helpful in this process... When it comes to grammar formats, GRXML(SRGS) grammars are the most common specificaiton compliant grammar in todays IVR development space. ABNF grammars and JSGF are still valid specification compliant grammars however they are not very common, and the majority of recognizers in the space today have done away support for them. Having said all that, Prophecy(our platform software) employs a grammar translator that ensures that all grammar formats are supported by the platform, so, GSL, JSGF, ABNF will work without issue. As far as a recommendation is concerned I would utilize SRGS with SISR return syntax as this is the most common specification compliant grammar available today. Hope this helps. Regards, Brian F. |
|
erelsgl
|
|
| Thanks for all the useful information!
I need some clarification: In the grammar line "<tag>out.MySlot="cheddar cheese";</tag>" do I have to use the same slot name "MySlot" as in the vxml line "<field name="F_1" slot="MySlot">"? What happens if I omit the slot name in the "field" tag - will I still be able to use it in the line "<value expr="lastresult$.interpretation.MySlot"/>"? |
|
xshao
|
|
| Hi,
Whatever name you use in the <field> tag, you'll reference it in lastresult$.interpretation.[that field name]. Hope this helps. Thanks. Xudong |
|