jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Hodson" <SHod...@voxgen.com>
Subject RE: Creating a set of Nuance grammars
Date Thu, 05 May 2005 15:05:25 GMT
I suppose I should detail a couple more findings on changing RDC GrXML to Nuance compliant
GrXML.
First using the concat($a $b) returns a list that is interpreted as a Vector by RDC (oh no!).
 So I've found after much trial and error
<tag><![CDATA[$=$+$lowercaseletter]]></tag> 

should be rewritten as
<tag>assign(a strcat($a strcat(" " $return)))</tag>

to return a string listing (in the above case separated by spaces)

Also the <item> repeat attribute needs to be of a fixed interval eg 1-10.  Nuance doesn't
like the 1- notation.

All of this is in no way a problem for RDC - it's more little things to bear in mind when
creating the Nuance compliant grammars.  If it is ok I could post more as I find them.

Sorry Daniel I didn't get back to you sooner but while I think converting the existing grammars
would be very beneficial I've been asked to create a <record> RDC-like tag [something
along the lines of please leave a message, blah, you said blah, would you like to save this
message, message saved].  This is proving to be quite a challenge and certainly a good introduction
to the RDCs.

:)
 

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



-----Original Message-----
From: Steve Hodson 
Sent: 05 May 2005 15:46
To: Tag Libraries Developers List
Subject: RE: Creating a set of Nuance grammars


Daniel's is exactly correct.  I too have found this to be a problem and overcame it by using
the return statement.  What follows is an example from alpha.grxml

<rule id="alpha" scope="public">
    <ruleref special="NULL"/>
    <item repeat="1-10">
      <item>
        <one-of>
          <item> <ruleref uri="#space"/><tag>assign(a strcat($a strcat("
" $return)))</tag></item> 
          <item> <ruleref uri="#apostrophe"/><tag>assign(a strcat($a strcat("
" $return)))</tag></item> 
          <item> <ruleref uri="#lowercaseletter"/><tag>assign(a strcat($a
strcat(" " $return)))</tag></item> 
          <item> <ruleref uri="#uppercaseletter"/><tag>assign(a strcat($a
strcat(" " $return)))</tag></item> 
        </one-of>
      </item>
    </item>
	<tag><![CDATA[<=$a>]]></tag>
  </rule>

<!-- rules as per original -->

  <rule id="lowercaseletter">
    <item repeat="0-1"> <ruleref uri="#lowercase"/> </item>
    <one-of>
      <item> <ruleref uri="#a"/> <tag> return("a")</tag> </item>
      <item> <ruleref uri="#z"/> <tag> return("z")</tag> </item>
    </one-of>
  </rule>
      
  <rule id="uppercaseletter">
    <ruleref uri="#uppercase"/>
    <one-of>
      <item> <ruleref uri="#a"/> <tag> return("A")</tag> </item>
      <item> <ruleref uri="#z"/> <tag> return("Z") </tag> </item>
    </one-of>
  </rule>
  <rule id="space">
    <item> space <tag> return(" ")</tag> </item>
  </rule>
  <rule id="apostrophe">
    <item> apostrophe <tag> return("'") </tag> </item>
  </rule>
</grammar>

Notice the single use of CDATA.  Also it seems by using <tag><![CDATA[<=$a>]]></tag>
Nuance interprets this as <= q> or whatever the required value is.  Thus (although I'm
not happy with it) it doesn't break RDC and the Nuance Compiler doesn't seem to mind either
and I don't have to use the 'compatibility' fix.  Still have the defaulting issue as mentioned
in 'Testing with Nuance'.

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



-----Original Message-----
From: Daniel Spangler [mailto:daniel.spangler@fluencyvoice.com]
Sent: 05 May 2005 15:27
To: taglibs-dev@jakarta.apache.org
Subject: RDC: Creating a set of Nuance grammars


I have been digging through the grammars a bit and building some regular expressions to convert
them over to use the compatibility slot for Nuance and stumbled upon an issue that I wanted
to post to the list.  The issue is that according to the Nuance spec you aren't supposed to
set a slot value more than once in a grammar.  This means that doing a quick run through the
grammars and just forcing everything that uses a nameless slot to use the compatibility slot
won't be sufficient.  

The problem is that in cases like the alpha rule, the sub rules used will need to use the
nuance "return" mechanism instead.  For instance, the alpha rule uses the space rule.  The
space rule returns a nameless slot value, and the alpha rule in turn returns a nameless slot
value.  To make this compatible with nuance, we need to make the space rule use the "return"
mechanism that cannot be included as part of an interpretation result, but can be added to
a slot in the alpha rule.

This isn't a big deal to do, but means people need to be aware that the sub rules may not
work as expected if used directly within an RDC.  For example, if the space rule uses the
"return" mechanism where no interpretation results are present, and someone builds an RDC
that accesses the space rule directly; it won't behave as expected when the nuance grammar
is used.

Daniel

 

 

  




 

________________________________________________________________________
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
________________________________________________________________________
#####################################################################################
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

#####################################################################################
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
View raw message