jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul P Akolkar <akol...@us.ibm.com>
Subject RE: RDC Commercially Applicable?? (MERGED WITH RE: Testing with Nuance)
Date Tue, 03 May 2005 03:28:15 GMT
Steve -- I've authored a RDC on Nuance. Many thanks to Daniel Spangler, 
for his patience and promptness, as he tried out a bunch of tests on the 
platform for me.

I present a GSL compatibility patch for the usState RDC. There are two 
changes:
1) The semantic interpretation (in the grammar) has been translated to one 
that is amenable to the GSLCompiler (as discussed before)
2) The other change has to do with the fact that GSL does not have the 
equivalent of an unnamed slot for the root rule of the grammar
[i.e. the <tag> $="foo" </tag> or <tag> $=$foo+"bar" </tag> construct
for 
the root rule ]. Since many RDCs use an unnamed slot in the grammars, the 
least resistance workaround for translating those to GSL grammars is to 
treat a specific named slot as an unnamed one. The "compatibility" slot in 
the patch that follows serves this purpose, as evident from the change to 
the serialization script.

Please let me know if you have any questions. To answer the broader 
question, I believe RDCs can run on any commercially available platform. 
This exercise with a new platform (new w.r.t RDC deployment) has been a 
good example. 

Thanks for starting this thread. I should get a FAQ section going in the 
online documentation, and link this thread there.
-Rahul

cvs diff usstate.grxml (in directory 
X:/Repository/apache/jakarta-taglibs/rdc/src/.grammar/)
Index: usstate.grxml
===================================================================
RCS file: 
/usr/local/cvsroot/apache/jakarta-taglibs/rdc/src/.grammar/usstate.grxml,v
retrieving revision 1.1
diff -r1.1 usstate.grxml
23,30c23,30
<         <item> Alabama <tag><![CDATA[$="AL"; ]]></tag></item>
<         <item> Alaska <tag><![CDATA[$="AK"; ]]></tag></item>
<         <item> Arizona <tag><![CDATA[$="AZ"; ]]></tag></item>
<         <item> Arkansas <tag><![CDATA[$="AR"; ]]></tag></item>
<         <item> California <tag><![CDATA[$="CA"; ]]></tag></item>
<         <item> Colorado <tag><![CDATA[$="CO"; ]]></tag></item>
<         <item> Connecticut <tag><![CDATA[$="CT"; ]]></tag></item>
<         <item> Delaware <tag><![CDATA[$="DE"; ]]></tag></item>
---
>         <item> Alabama <tag><![CDATA[<compatibility 
"AL">]]></tag></item>
>         <item> Alaska <tag><![CDATA[<compatibility "AK">]]></tag></item>
>         <item> Arizona <tag><![CDATA[<compatibility 
"AZ">]]></tag></item>
>         <item> Arkansas <tag><![CDATA[<compatibility 
"AR">]]></tag></item>
>         <item> California <tag><![CDATA[<compatibility 
"CA">]]></tag></item>
>         <item> Colorado <tag><![CDATA[<compatibility 
"CO">]]></tag></item>
>         <item> Connecticut <tag><![CDATA[<compatibility 
"CT">]]></tag></item>
>         <item> Delaware <tag><![CDATA[<compatibility 
"DE">]]></tag></item>
39c39
<             </item><tag><![CDATA[$="DC"; ]]></tag>
---
>             </item><tag><![CDATA[<compatibility "DC">]]></tag>
41,82c41,82
<         <item> Florida <tag><![CDATA[$="FL"; ]]></tag></item>
<         <item> Georgia <tag><![CDATA[$="GA"; ]]></tag></item>
<         <item> Hawaii <tag><![CDATA[$="HI"; ]]></tag></item>
<         <item> Idaho <tag><![CDATA[$="ID"; ]]></tag></item>
<         <item> Illinois <tag><![CDATA[$="IL"; ]]></tag></item>
<         <item> Indiana <tag><![CDATA[$="IN"; ]]></tag></item>
<         <item> Iowa <tag><![CDATA[$="IA"; ]]></tag></item>
<         <item> Kansas <tag><![CDATA[$="KS"; ]]></tag></item>
<         <item> Kentucky <tag><![CDATA[$="KY"; ]]></tag></item>
<         <item> Louisiana <tag><![CDATA[$="LA"; ]]></tag></item>
<         <item> Maine <tag><![CDATA[$="ME"; ]]></tag></item>
<         <item> Maryland <tag><![CDATA[$="MD"; ]]></tag></item>
<         <item> Massachusetts <tag><![CDATA[$="MA"; ]]></tag></item>
<         <item> Michigan <tag><![CDATA[$="MI"; ]]></tag></item>
<         <item> Minnesota <tag><![CDATA[$="MN"; ]]></tag></item>
<         <item> Mississippi <tag><![CDATA[$="MS"; ]]></tag></item>
<         <item> Missouri <tag><![CDATA[$="MO"; ]]></tag></item>
<         <item> Montana <tag><![CDATA[$="MT"; ]]></tag></item>
<         <item> Nebraska <tag><![CDATA[$="NE"; ]]></tag></item>
<         <item> Nevada <tag><![CDATA[$="NV"; ]]></tag></item>
<         <item> New Hampshire <tag><![CDATA[$="NH"; ]]></tag></item>
<         <item> New Jersey <tag><![CDATA[$="NJ"; ]]></tag></item>
<         <item> New Mexico <tag><![CDATA[$="NM"; ]]></tag></item>
<         <item> New York <tag><![CDATA[$="NY"; ]]></tag></item>
<         <item> North Carolina <tag><![CDATA[$="NC"; ]]></tag></item>
<         <item> North Dakota <tag><![CDATA[$="ND"; ]]></tag></item>
<         <item> Ohio <tag><![CDATA[$="OH"; ]]></tag></item>
<         <item> Oklahoma <tag><![CDATA[$="OK"; ]]></tag></item>
<         <item> Oregon <tag><![CDATA[$="OR"; ]]></tag></item>
<         <item> Pennsylvania <tag><![CDATA[$="PA"; ]]></tag></item>
<         <item> Rhode Island <tag><![CDATA[$="RI"; ]]></tag></item>
<         <item> South Carolina <tag><![CDATA[$="SC"; ]]></tag></item>
<         <item> South Dakota <tag><![CDATA[$="SD"; ]]></tag></item>
<         <item> Tennessee <tag><![CDATA[$="TN"; ]]></tag></item>
<         <item> Texas <tag><![CDATA[$="TX"; ]]></tag></item>
<         <item> Utah <tag><![CDATA[$="UT"; ]]></tag></item>
<         <item> Vermont <tag><![CDATA[$="VT"; ]]></tag></item>
<         <item> Virginia <tag><![CDATA[$="VA"; ]]></tag></item>
<         <item> Washington <tag><![CDATA[$="WA"; ]]></tag></item>
<         <item> West Virginia <tag><![CDATA[$="WV"; ]]></tag></item>
<         <item> Wisconsin <tag><![CDATA[$="WI"; ]]></tag></item>
<         <item> Wyoming <tag><![CDATA[$="WY"; ]]></tag></item>
---
>         <item> Florida <tag><![CDATA[<compatibility 
"FL">]]></tag></item>
>         <item> Georgia <tag><![CDATA[<compatibility 
"GA">]]></tag></item>
>         <item> Hawaii <tag><![CDATA[<compatibility "HI">]]></tag></item>
>         <item> Idaho <tag><![CDATA[<compatibility "ID">]]></tag></item>
>         <item> Illinois <tag><![CDATA[<compatibility 
"IL">]]></tag></item>
>         <item> Indiana <tag><![CDATA[<compatibility 
"IN">]]></tag></item>
>         <item> Iowa <tag><![CDATA[<compatibility "IA">]]></tag></item>
>         <item> Kansas <tag><![CDATA[<compatibility "KS">]]></tag></item>
>         <item> Kentucky <tag><![CDATA[<compatibility 
"KY">]]></tag></item>
>         <item> Louisiana <tag><![CDATA[<compatibility 
"LA">]]></tag></item>
>         <item> Maine <tag><![CDATA[<compatibility "ME">]]></tag></item>
>         <item> Maryland <tag><![CDATA[<compatibility 
"MD">]]></tag></item>
>         <item> Massachusetts <tag><![CDATA[<compatibility 
"MA">]]></tag></item>
>         <item> Michigan <tag><![CDATA[<compatibility 
"MI">]]></tag></item>
>         <item> Minnesota <tag><![CDATA[<compatibility 
"MN">]]></tag></item>
>         <item> Mississippi <tag><![CDATA[<compatibility 
"MS">]]></tag></item>
>         <item> Missouri <tag><![CDATA[<compatibility 
"MO">]]></tag></item>
>         <item> Montana <tag><![CDATA[<compatibility 
"MT">]]></tag></item>
>         <item> Nebraska <tag><![CDATA[<compatibility 
"NE">]]></tag></item>
>         <item> Nevada <tag><![CDATA[<compatibility "NV">]]></tag></item>
>         <item> New Hampshire <tag><![CDATA[<compatibility 
"NH">]]></tag></item>
>         <item> New Jersey <tag><![CDATA[<compatibility 
"NJ">]]></tag></item>
>         <item> New Mexico <tag><![CDATA[<compatibility 
"NM">]]></tag></item>
>         <item> New York <tag><![CDATA[<compatibility 
"NY">]]></tag></item>
>         <item> North Carolina <tag><![CDATA[<compatibility 
"NC">]]></tag></item>
>         <item> North Dakota <tag><![CDATA[<compatibility 
"ND">]]></tag></item>
>         <item> Ohio <tag><![CDATA[<compatibility "OH">]]></tag></item>
>         <item> Oklahoma <tag><![CDATA[<compatibility 
"OK">]]></tag></item>
>         <item> Oregon <tag><![CDATA[<compatibility "OR">]]></tag></item>
>         <item> Pennsylvania <tag><![CDATA[<compatibility 
"PA">]]></tag></item>
>         <item> Rhode Island <tag><![CDATA[<compatibility 
"RI">]]></tag></item>
>         <item> South Carolina <tag><![CDATA[<compatibility 
"SC">]]></tag></item>
>         <item> South Dakota <tag><![CDATA[<compatibility 
"SD">]]></tag></item>
>         <item> Tennessee <tag><![CDATA[<compatibility 
"TN">]]></tag></item>
>         <item> Texas <tag><![CDATA[<compatibility "TX">]]></tag></item>
>         <item> Utah <tag><![CDATA[<compatibility "UT">]]></tag></item>
>         <item> Vermont <tag><![CDATA[<compatibility 
"VT">]]></tag></item>
>         <item> Virginia <tag><![CDATA[<compatibility 
"VA">]]></tag></item>
>         <item> Washington <tag><![CDATA[<compatibility 
"WA">]]></tag></item>
>         <item> West Virginia <tag><![CDATA[<compatibility 
"WV">]]></tag></item>
>         <item> Wisconsin <tag><![CDATA[<compatibility 
"WI">]]></tag></item>
>         <item> Wyoming <tag><![CDATA[<compatibility 
"WY">]]></tag></item>


cvs diff nbest.js (in directory 
X:/Repository/apache/jakarta-taglibs/rdc/src/.grammar/)
Index: nbest.js
===================================================================
RCS file: 
/usr/local/cvsroot/apache/jakarta-taglibs/rdc/src/.grammar/nbest.js,v
retrieving revision 1.1
diff -r1.1 nbest.js
47c47,52
<                 out += name + "=" + o [ prop ];
---
>                 // For platforms that do not allow unnamed slots
>                 if (name == "compatibility") {
>                     out += "=" + o [ prop ];
>                 } else {
>                     out += name + "=" + o [ prop ];
>                 }


On 4/27/05, Rahul P Akolkar <akolkar@us.ibm.com> wrote:
> Steve -- Thanks for trying this.
> 
> Here is some background before we get to your question -- from a 
previous
> email:
> <snippet>
> Caveats to bear in mind:
> a) The grammars (and the Grammar servlet)
> b) The JavaScript for serializing application.lastresult$ in the browser
> c) Subtleties in the VoiceXML markup
> </snippet>
> 
> (a) and (b) work together to get the expected serialization of
> application.lastresult$ from the platform for server side n-best
> canonicalization and validation by the RDC. This should completely
> demystify the process:
> Client [
> 
http://cvs.apache.org/viewcvs.cgi/jakarta-taglibs-sandbox/rdc/src/.grammar/nbest.js?view=markup
> ]
> Server [
> 
http://cvs.apache.org/viewcvs.cgi/jakarta-taglibs-sandbox/rdc/src/org/apache/taglibs/rdc/core/NBestResults.java?view=markup
> ]
> 
> Also, all elements of an existing RDC (grammar, prompt file, private 
data
> model, tag impl) are a cohesive unit, each one expecting the other to
> fulfill their internal contracts.
> 
> Now to the specifics of your question :-)
> 
> <tag><![CDATA[<alphanumInput alphlist>]]></tag>
> 
> 1) Why? :-) Please try to "translate" the grammar in the distro to its 
GSL
> equivalent. Adding slot names to the replaced grammar that don't exist 
in
> the original breaks the internal contracts. Please read alphlist as "GSL
> equivalent of $ object for root rule" for rest of this email :-)
> 2) Don't see alphlist being initialized (look at NULL rule in distro
> grammar)
> 3) alphlist is a string literal in <alphanumInput alphlist>, as evident
> from the tail of the GET uri (saying this as we move to POST ;-)
> 4) Additionally, I believe GSL would like all utterances in lower case 
(a
> for A)
> 
> Is there (publicly available) documentation (though I suspect it won't
> help me much without access to the platform)?
> 
> -Rahul
> 
> 
> On 4/27/05, Steve Hodson <SHodson@voxgen.com> wrote:
> > All,
> >
> > I'm currently in the process of altering the alphnum.grxml file so 
that
> the alphanum-test.jsp will work with Nuance.  However having uttered "1 
2
> 3 a b c" it simply asks for an alphanumeric value again (ad infinitum).
> What might be causing the page to repeat the question rather than 
process
> the response.  Do I need to look elsewhere within RDC???
> >
> > Cheers
> >
> > The log message is
> > __DEBUG_UTTERANCE         = one two three a b c
> > __DEBUG_LENGTH            = 1
> > TRANSITION                =
> http://localhost:7100/RDCTest/alphanum-test.jsp resulted in
> 
http://localhost:7100/RDCTest/alphanum-test.jsp;jsessionid=BBB451F4E51D1C347FFF18C7C6954EA6?alphanumResultNBest=0.699999988079071%253Bone%2520two%2520three%2520a%2520b%2520c%253BalphanumInput%253Dalphlist
> > EXECUTING_URL             =
> 
http://localhost:7100/RDCTest/alphanum-test.jsp;jsessionid=BBB451F4E51D1C347FFF18C7C6954EA6?alphanumResultNBest=0.699999988079071%253Bone%2520two%2520three%2520a%2520b%2520c%253BalphanumInput%253Dalphlist<>http://localhost:7100/RDCTest/alphanum-test.jsp;jsessionid=BBB451F4E51D1C347FFF18C7C6954EA6?alphanumResultNBest=0.699999988079071%253Bone%2520two%2520three%2520a%2520b%2520c%253BalphanumInput%253Dalphlist
> >
> > My Grammar file is:
> > <?xml version="1.0" ?>
> > <grammar xmlns="http://www.w3.org/2001/06/grammar"
> >          xmlns:nuance="http://voicexml.nuance.com/grammar"
> >          xml:lang="en-UK" tag-format="Nuance" root="alphanum">
> >
> > <rule id="alphanum" scope="public">
> >  <item repeat="1-6">
> >        <one-of>
> >        <item><ruleref uri="#number"/><tag>insert-end(alphlist
> $return)</tag></item>
> >                <item><ruleref uri="#hyphen"/><tag>insert-end(alphlist
> $return)</tag></item>
> >                <item><ruleref 
uri="#alphabet"/><tag>insert-end(alphlist
> $return)</tag></item>
> >        </one-of>
> >  </item>
> >  <tag><![CDATA[<alphanumInput alphlist>]]></tag>
> > </rule>
> >
> > <rule id="alphabet">
> > <one-of>
> >    <item> A </item>
> >    <item> B </item>
> >    <!-- the rest of the alphabet -->
> >    <item> Y </item>
> >    <item> Z </item>
> >  </one-of>
> >  <tag>return($string)</tag>
> >  </rule>
> >
> >  <rule id="number">
> >  <one-of>
> >        <item>
> >        <item>
> >          <one-of>
> >            <item>oh</item>
> >            <item>nil</item>
> >            <item>null</item>
> >                        <item>zero</item>
> >          </one-of>
> >        </item><tag>return("0")</tag>
> >        </item>
> >    <item>one           <tag>return("1")</tag></item>
> >    <item>two           <tag>return("2")</tag></item>
> >        <!-- Numbers one to nine inclusive -->
> >        <item>eight     <tag>return("8")</tag></item>
> >    <item>nine  <tag>return("9")</tag></item>
> >        </one-of>
> >  </rule>
> > </grammar>
> >
> > Steve Hodson
> > VoxGen
> > Manor House, 21 Soho Square
> > London W1D 3QP
> >
> > Email: shodson@voxgen.com
> > Tel: +44 (0)870 350 2100
> > Fax: +44 (0)870 350 2101
> > Direct: +44 (0)20 7851 1025
> >
> 
#####################################################################################
> > Winner - e-Government excellence 2004.
> > Runner up - European Information Management awards 2004:
> > - The Premier Project Award.
> > - B2C Commerce Project Award.
> > - CRM Project Award.
> >
> > For more information visit us at www.voxgen.com
> >
> >
> 
#####################################################################################
> > Note:
> > This message is for the named person's use only.  It may contain
> confidential,
> > proprietary or legally privileged information.  No confidentiality or
> privilege
> > is waived or lost by any mistransmission.  If you receive this message
> in error,
> > please immediately delete it and all copies of it from your system,
> destroy any
> > hard copies of it and notify the sender.  You must not, directly or
> indirectly,
> > use, disclose, distribute, print, or copy any part of this message if
> you are not
> > the intended recipient. Vox Generation Limited and any of its
> subsidiaries each
> > reserve the right to monitor all e-mail communications through its
> networks.
> >
> > Any views expressed in this message are those of the individual 
sender,
> except where
> > the message states otherwise and the sender is authorised to state 
them
> to be the
> > views of any such entity.
> >
> > Thank You.
> >
> 
#####################################################################################
> >
> >
> 
#####################################################################################
> > This e-mail message has been scanned for Viruses and Content and 
cleared
> > by NetIQ MailMarshal
> >
> 
#####################################################################################
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> >
> >
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message