W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2005

Using SI with one-of in SRGS?

From: Dave Raggett <dsr@w3.org>
Date: Tue, 12 Apr 2005 11:02:44 +0100 (BST)
To: www-voice@w3.org
Message-ID: <Pine.LNX.4.61.0504121102190.9194@holly>

Hash: SHA1

I have a question on using Semantic Interpretation for
Speech Recognition with SRGS one-of elements:

I am working on a speech recognition extension for the Firefox
browser, and to test my understanding have put together a grammar
for numbers, e.g.

  <rule id="units">

  <rule id="tens">
  <item repeat="0-1"><ruleref uri="#units"/></item>

for utterances like "twenty one", and similarly for more
complex numbers.

I now want to use SI tags to compute the numerical value as
the interpretation. I started by adding tag elements for
the numeric literals, e.g.

  <rule id="tens">
  <tag>var $units=0;</tag>
  <item repeat="0-1"><ruleref uri="#units"/></item>
  <!-- the following won't work as needed -->
  <tag>out = $tens + $units</tag>

where the declaration of $units in the first tag element is based
upon an example in the SISR specification from section 3.3.2.

Unfortunately, I don't know how to reference the value obtained
from  the one-of element within the "tens" rule and $tens clearly
won't work as written in the above example.

So how do you name the value from an item or from a one-of
within a rule without breaking it out into a separate rule?

Many thanks,
- --
  Dave Raggett <dsr@w3.org>  W3C lead for multimodal interaction
  http://www.w3.org/People/Raggett +44 1225 866240 (or 867351)

- --[PinePGP]-----------------------------------------------------------
> Signature made Tue 12 Apr 2005 10:59:46 AM BST using DSA key ID 6C40B14B
> Good signature from "Dave Raggett <dsr@w3.org>"
- --[PinePGP]----------------------------------------------------[end]--
Version: GnuPG v1.2.4 (GNU/Linux)

Received on Tuesday, 12 April 2005 10:02:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:03:50 UTC