I may be stating the obvious, but I suspect that the problem lies with variable scoping and how they handle repeats. Have you by any chance tried removing the repeat while keeping the variable assignment and slot filling tags?
________________________________ From: Stu Robertson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 3:48 PM To: Tag Libraries Developers List Subject: Re: RDC: Plan B for getting Nuance to work with RDCs Sure. Here's digits.grxml <?xml version="1.0"?> <grammar xmlns="http://www.w3.org/2001/06/grammar" xmlns:nuance="http://voicexml.nuance.com/grammar" version="1.0" mode="voice" xml:lang="en-US" tag-format="Nuance" root="numbers"> <!-- Copyright 2004 The Apache Software Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <rule id="numbers" scope="public"> <item repeat="1-50"> <item><ruleref uri="#digit"/> <tag>assign(a strcat($a strcat(" " $return)))</tag> </item> </item> <tag><![CDATA[<compatibility $a>]]></tag> </rule> <rule id="digit"> <one-of> <item> <item> <one-of> <item> oh </item> <item> nil </item> <item> null </item> </one-of> </item><tag> return("0") </tag> </item> <item> 0 <tag> return("0") </tag></item> <item> 1 <tag> return("1") </tag></item> <item> 2 <tag> return("2") </tag></item> <item> 3 <tag> return("3") </tag></item> <item> 4 <tag> return("4") </tag></item> <item> 5 <tag> return("5") </tag></item> <item> 6 <tag> return("6") </tag></item> <item> 7 <tag> return("7") </tag></item> <item> 8 <tag> return("8") </tag></item> <item> 9 <tag> return("9") </tag></item> </one-of> </rule> </grammar> You'll also need digits-dtmf.grxml, which had to be changed a bit too: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd"> <grammar version="1.0" xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" tag-format="semantics/1.0" mode="dtmf" root="digits_dtmf"> <!-- Copyright 2004 The Apache Software Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <rule id="digit"> <one-of> <item> 0 <tag> return("0") </tag></item> <item> 1 <tag> return("1") </tag></item> <item> 2 <tag> return("2") </tag></item> <item> 3 <tag> return("3") </tag></item> <item> 4 <tag> return("4") </tag></item> <item> 5 <tag> return("5") </tag></item> <item> 6 <tag> return("6") </tag></item> <item> 7 <tag> return("7") </tag></item> <item> 8 <tag> return("8") </tag></item> <item> 9 <tag> return("9") </tag></item> </one-of> </rule> <rule id="digits_dtmf" scope="public"><ruleref special="NULL"/> <item repeat="1-"> <item><ruleref uri="#digit"/> <tag>assign(a strcat($a strcat(" " $return)))</tag> </item> </item> <tag> <![CDATA[<compatibility $a>]]> </tag> </rule> </grammar> On Jun 14, 2005, at 2:41 PM, Daniel Spangler wrote: > Can you attach the entire grammar including the digit rule? > > > > ________________________________ > > From: Stu Robertson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 14, 2005 1:57 PM > To: Tag Libraries Developers List > Subject: Re: RDC: Plan B for getting Nuance to work with RDCs > > > > Hi Daniel. It is confusing to me also :-) > > In short, we're unable to get the interpretation to be set to a slot > by the digits or alpha grammar (or any other grammar actually). Here > are some things I've tried: > > <?xml version="1.0"?> > <grammar xmlns="http://www.w3.org/2001/06/grammar" > xmlns:nuance="http://voicexml.nuance.com/grammar" > version="1.0" mode="voice" xml:lang="en-US" > tag-format="Nuance" root="numbers"> <!-- I changed the > attributes to match Nuance docs --> > > <rule id="numbers" scope="public"> > <item repeat="1-50"> > <item><ruleref uri="#digit"/> > <tag>assign(a strcat($a strcat(" " $return)))</tag> > </item> > </item> > <tag><![CDATA[<compatibility $a>]]></tag> > </rule> > > This now compiles, but nothings shows up in the interpretation as a > property. I've also tried using an unamed slot like <=$a> with the > same problem. > > The only thing that's been close is > > <tag> compatibility=$a </tag> > > Which creates a property in the interpretation correctly, but sets > its value to "null". > > In all of the above cases the utterance is correctly recognized. But > the nBest.js isn't able to get at the semantic interpretation. > > > > On Jun 14, 2005, at 10:39 AM, Daniel Spangler wrote: > > >> I've kind of gotten lost in this long thread. Stu, could you re- >> post the >> exact problem that you are currently stuck on? >> >> >> >> ________________________________ >> >> From: Stuart D. Robertson II [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, June 14, 2005 11:31 AM >> To: Tag Libraries Developers List >> Subject: Re: RDC: Plan B for getting Nuance to work with RDCs >> >> >> >> >> >>> None of you have any access to Nuance support? Their grammar >>> >>> >> guide sure >> >> >>> shows CDATA's and assign's and sub-rules and everything that is >>> >>> >> needed in >> >> >>> GrXML for us [ >>> >>> >> http://community.voxeo.com/vxml/docs/nuance20/grammar.pdf >> >> >>> ]. There is a sample retail application on Page 181 that uses >>> >>> >> GrXML. Have >> >> >>> you tried changing tag format to "Nuance" i.e. try using the >>> >>> >> same grammar >> >> >>> root element as the sample shows? I guess you have tried >>> >>> >> everything by >> >> >>> now. >>> >>> >> >> Hmm, I didn't notice that before, and did not try it. It makes >> me really wish I were home so I could try it out now (I can only >> test at home b/c of the firewall at work). >> >> Like you, I'd much prefer getting SRGS grammars working than >> have to make a big switch. Ideally, we could just apply some >> xslt to the main grammars (those based on the final >> recommendation version of the standard, not the one from 2001 >> that Nuance uses). I'll test this as soon as I can and post >> results. I'll also see if I can get their example working as >> if. If that works, you're right...what we're trying to do isn't >> really different. >> >> Glad you like the wiki page :-). I certainly would have found >> that one useful, so I suspect others will too. >> >> Stu >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> ________________________________ >> >> avast! Antivirus <http://www.avast.com> : Inbound message clean. >> >> Virus Database (VPS): 0524-1, 06/14/2005 >> Tested on: 6/14/2005 11:30:06 AM >> avast! - copyright (c) 2000-2004 ALWIL Software. >> >> >> >> _____________________________________________________________________ >> _ >> __ >> This email has been scanned for all viruses by Netscalibur Mail >> Scanner, powered by MessageLabs. For more information on a >> proactive email security service working around the clock, around >> the globe, visit >> http://www.netscalibur.co.uk/scanner/index.html >> _____________________________________________________________________ >> _ >> __ >> > > > > ________________________________ > > avast! Antivirus <http://www.avast.com> : Inbound message clean. > > Virus Database (VPS): 0524-1, 06/14/2005 > Tested on: 6/14/2005 1:56:12 PM > avast! - copyright (c) 2000-2004 ALWIL Software. > > > > ______________________________________________________________________ > __ > This email has been scanned for all viruses by Netscalibur Mail > Scanner, powered by MessageLabs. For more information on a > proactive email security service working around the clock, around > the globe, visit > http://www.netscalibur.co.uk/scanner/index.html > ______________________________________________________________________ > __ ________________________________ avast! Antivirus <http://www.avast.com> : Inbound message clean. Virus Database (VPS): 0524-1, 06/14/2005 Tested on: 6/14/2005 3:47:36 PM avast! - copyright (c) 2000-2004 ALWIL Software. ________________________________________________________________________ This email has been scanned for all viruses by Netscalibur Mail Scanner, powered by MessageLabs. For more information on a proactive email security service working around the clock, around the globe, visit http://www.netscalibur.co.uk/scanner/index.html ________________________________________________________________________
