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

Re: scope of root and meaning of public

From: Krause, Stefan <Stefan.Krause@Scansoft.com>
Date: Tue, 1 Apr 2003 17:22:58 +0200
Message-ID: <BBF29C9B95E52E4DB5C29A0ACC94E83B088603@ac-exch1.eu.scansoft.com>
To: "'jf_jackson@hotmail.com'" <jf_jackson@hotmail.com>
Cc: "'www-voice@w3.org'" <www-voice@w3.org>

Jim,

Thank you for your comments on SRGS. I'm sorry for the long delay in
replying.

(This is the reply from the Voice Browser Working Group to the
following mail:
http://lists.w3.org/Archives/Public/www-voice/2002JulSep/0006.html)

Your mail contains two comments. The first one regards
the scope of root rules, the second one the meaning of "activable".

1. Scope of root rules.
The group does not think that the sentence in section 4.7
("The rule declared as the root rule may be scoped as either public or
private.") is misleading.

The spec clearly distinguishes between a reference to the root rule
of a grammar and a reference to a named rule.
According to section 2.2 of the SRGS spec
<ruleref uri="grammarURI"/>
is a reference to a root rule, and
<ruleref uri="grammarURI#rulename"/>
is a reference to a named rule, whether or not the referenced rule is
declared as the root. (Further details are explained in section 2.2.2.)

A reference to a named rule is valid only if the referenced
rule is declared to be public. A reference to a grammar without a
fragment identifier, i.e. a reference to a root rule, is valid even
if the root rule of the referenced grammar is declared to be private.
(See Section 4.7 for details.)

The same reasoning applies to the activation of rules.

However, the wording of the second and third paragraphs in Section 3.2
seems to be a little confusing:
 "A rule with 'private' scope is visible only within its containing
  grammar. A private rule may be referenced only by other rules within
  the same grammar.
  One exception is that a rule declared as the root may be referenced
  externally even if it is a private rule. See Section 4.7 for details."
  
This wording will be changed in order to make the difference in semantics
between a reference to a rule and a reference to a grammar clearer. 

2. Meaning of "activable".
Your interpretation of what the spec says about the activation of
rules seems to be not quite correct. Being "activable" is not on/off
switchable at engine run-time. The grammar defines which rules can be
activated. At run-time an application may choose which subset of the
"activable" (i.e. public or root) rules are active for recognition as
stated in section 3.2. If a rule is active then the recognizer may
apply each alternative that is defined for this rule. The same holds
for any (directly or indirectly referenced) rule that the recognizer
encounters on its way down the tree. There is no mechanism to
dynamically restrict a given grammar. Specifically, when the root rule
in your example is activated, both the '$people_1st_floor' and the
'$people_2nd_floor' rules may be used during recognition, even though
these rules are not active by themselves.

If you have any further questions, please feel free to ask.

Regards,
Stefan Krause (ScanSoft)
on behalf of the Voice Browser Working Group
Received on Tuesday, 1 April 2003 10:22:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 October 2006 12:48:58 GMT