W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2002

Re: Personal comments on Speech Recognition Grammar Spec last call

From: <Luc.Van.Tichelen@lhs.be>
Date: Fri, 15 Mar 2002 18:53:11 +0100
To: Martin Duerst <duerst@w3.org>
Cc: www-voice@w3.org
Message-ID: <OF6FC1D263.CC399F70-ONC1256B7D.0060C11A@lhs.be>

Dear Martin,


On your comments about scoping of grammar rules:
   16) 3.2 Scoping: The scoping rules are explained by reference to Java.
        However, while there are very good reasons for data hiding and
        therefore to have a default of 'private' in programming languages
        such as Java, I can see absolutely no need for data hiding in
        the case of speech grammar rules. There should be a better
        explanation for why the default is 'private', or the default
        should be changed to 'public' to make it easier to reuse rules.
        Also, the rule that a private root can not be referenced by
        name seems unmotivated.



This concept of "scoping" grammar rules to declare what rules are visible
outside the grammar and what rules are not, is perhaps less inspired by the
Java programming language than by long standing practice in various speech
grammar formalisms used by various speech recognition technology vendors.

But the reasons for data hiding in speech grammars are not unlike the
reasons for private/public distinctions in other programming languages:

1) When creating larger applications with several grammars referencing
other grammars, the scoping rules help ensuring that only the intended
rules are referenced from outside the grammar, and not internal helper
rules. This in fact helps reusability by making explicit which rules are
meant for reuse.

2) If the grammar source is under control by a developer, it is always
possible to turn a rule into a public one by modifying the grammar. This
constitutes an explicit act, so the developer is invited to double check
that the rule is not inadvertently introducing unwanted grammar fragments
that could compromise the grammar in which the rule is referenced. Rules
should therefore be private by default, and public only by explicit intent
by the developer.

3) Grammar compilation resembles programming language compilation. Making
rules private allows advanced grammar compilers to perform certain
optimizations that can not be applied when a rule is declared public and
must therefore be available for activation and external referencing. This
is another reason to make rules private by default.

Kind Regards,

Luc Van Tichelen
Director Dialogue Technology

=====================================================================
ScanSoft bvba                                 Luc.Van.Tichelen@lhs.be
Speech and Language Technologies              tel     +32-57-22.88.88
Flanders Language Valley 50                   fax     +32-57-20.84.89
8900 Ieper, Belgium                           http://www.scansoft.com
=====================================================================
Received on Friday, 15 March 2002 12:58:49 GMT

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