tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vani Ampavathina" <v...@servion.com>
Subject RE: Regarding RDC
Date Mon, 06 Feb 2006 11:28:07 GMT
Hi Rahul & Aravilli

Thanks for the clarifications. 

Rahul 
Can you please explain us the "Finite State Machine (FSM)" we are
talking here? I notice three fsm tags, fsm_input.tag, fsm_confirm.tag
and fsm_run.tag. When does this state machine start and what are the
transition states it goes and what are its effects.

Aravilli

Seen the mails you forwarded. I have a question on the implementation
"commenting the script element in the fsm_input.tag"; given.

I did not find the "builtinGrammar.tag" in the rdc folder. Is this
deprecated or the one you suggested and rdc is yet to yet to approve?

Regards
Vani

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: Friday, February 03, 2006 7:24 AM
To: Tag Libraries Users List
Subject: Re: Regarding RDC

On 2/2/06, Vani Ampavathina <vani.ampavathina@gmail.com> wrote:
>  Hi
>
>  I am evaluating the RDC Tag  libraries to use in our speech
> applications.Ihave a small difficulty in using these tags. can you
> help me in briefing a
> solution for the following problem.
>
> 1) When I use,say for example "alpha" tag, I would like to have my own
logic
> in the "filled" block rather having the default submit and the
namelist
> formed from the Nbest.js. From the provided document , I understand
that we
> can use the submit attribute to submit to any other JSP, but what
about the
> variables i wish to pass on to the next JSP?
>
<snip/>

I would consider the use of the submit attribute to cover only corner
cases, and on a case-by-case basis. It is generally recommended to
leave it unspecified, so the component submits back to itself which is
its default behavior (and thus, allows its state machine to run to
completion). The RDC framework in itself, does nothing for cross-page
navigation. There are multiple web application frameworks that provide
such controllers (such as Struts), and we encourage you to pick one of
those while authoring your applications. To illustrate the point, the
RDC distribution does provide tags to submit to Struts actions, and
echo the errors from these actions as prompts.

More on that here:

http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorial
s/StrutsInterface

If you want to directly submit to another JSP (without using Struts),
that is quite easy as well, see my other note that Aravilli referenced
earlier in this message thread. These two approaches maintain
component boundaries and responsibilities appropriately.


> Say to have something like
>
> <filled>
>  <submit next="UseCollectedAlpha.jsp" namelist="alphacollected var1
var2
> var3"/>
> </filled>
>
> instead of
>
> <filled>
>    <script src="/rdc-examples/.grammar/nbest.js"/>
>    <var name="alphaResultNBest" expr="serializeNBest()"/>
>    <submit
>
next="/rdc-examples/alpha.jsp;jsessionid=CD6603360BFF6C0D33417D414A2D205
C"
> method="post" namelist="alphaResultNBest"/>
>  </filled>
>
> is it possible to implement this?
<snap/>

Yes, as mentioned above.


> whats the reason to send the confidence,
> utterance and the interpretation as a serialized object from the
nbest.js?
> by default the maxNBest is set to 5 and all the values are
concatenated and
> returned. is there any special reason of such implementation, when i
can
> directly take up the "application.lastresult$.utterance" for the most
> probable value, the asr recognized.
>
<snip/>

A RDC component is a JSP tag, and exists server-side. The information
you quote is only available on the client. The framework makes sure
application.lastresult$ can be examined by the component's private
data model (see Building Blocks for what that means):

http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorial
s/BuildingBlocks


> 2) how is a simple JSP with 4 lines of code getting translated to few
tens
> lines of code? The tutorials and wikis doesn't help in understanding
the
> concept.The only vxml tag I can see in the Tag library is <form> in "
> task.tag".
<snap/>

Its no magic, I assure you ;-) Look at the fsm-*.tag files in this
directory:

http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/src/MET
A-INF/tags/rdc/

Those do most of the VoiceXML generation. Each component maintains an
internal finite state machine, which determines what output is
generated at any given turn.


> The config file gives the prompts list, this part is
> understood. But how are the attributes like minLength and maxLength of
> "alpha" tag, for example, used to limit the grammar as I notice there
is no
> direct correspondence to these attributes, and where is the input
entered by
> the user getting validated?
>
<snip/>

Those are used by the validate() method of the private data model to
decide whether the input received is valid or not. The private data
models are here:

http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/src/org
/apache/taglibs/rdc/

The methods of importance are validate() and canonicalize().

Please let me know if you have other questions.

-Rahul


>
> Regards
> Vani
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message