W3C home > Mailing lists > Public > public-speech-api@w3.org > June 2012

RE: The SpeechRecognition.maxNBest attribute

From: Young, Milan <Milan.Young@nuance.com>
Date: Tue, 19 Jun 2012 20:17:29 +0000
To: Satish S <satish@google.com>
CC: Hans Wennborg <hwennborg@google.com>, "olli@pettay.fi" <olli@pettay.fi>, "public-speech-api@w3.org" <public-speech-api@w3.org>
Message-ID: <B236B24082A4094A85003E8FFB8DDC3C1A4745F4@SOM-EXCH04.nuance.com>
Good to know.  'unsigned long' it is.


From: Satish S [mailto:satish@google.com]
Sent: Tuesday, June 19, 2012 12:55 PM
To: Young, Milan
Cc: Hans Wennborg; olli@pettay.fi; public-speech-api@w3.org
Subject: Re: The SpeechRecognition.maxNBest attribute

WebIDL's special operations section<http://www.w3.org/TR/WebIDL/#idl-special-operations> defines the following:

Getters, setters, creators and deleters come in two varieties: ones that take a DOMString<http://www.w3.org/TR/WebIDL/#idl-DOMString> as a property name, known as named property getters, named property setters, named property creators and named property deleters, and ones that take an unsigned long<http://www.w3.org/TR/WebIDL/#idl-unsigned-long> as a property index, known as indexed property getters, indexed property setters, indexed property creatorsand indexed property deleters

So the preference for array index is an unsigned long and we should use the same for maxAlternatives which specifies the max length of the array.

Cheers
Satish

On Tue, Jun 19, 2012 at 7:30 PM, Young, Milan <Milan.Young@nuance.com<mailto:Milan.Young@nuance.com>> wrote:
I don't have the web background that you folks possess, so I'm happy to be told I'm wrong.  But my thinking is that they put short in the IDL spec for a reason, and this seems like a perfect use case.  Using short communicates to the developer that this is an array index, not some unbounded quantity like a duration.

Thanks

-----Original Message-----
From: Hans Wennborg [mailto:hwennborg@google.com<mailto:hwennborg@google.com>]
Sent: Tuesday, June 19, 2012 10:36 AM
To: Young, Milan
Cc: olli@pettay.fi<mailto:olli@pettay.fi>; public-speech-api@w3.org<mailto:public-speech-api@w3.org>
Subject: Re: The SpeechRecognition.maxNBest attribute
On Tue, Jun 19, 2012 at 3:55 PM, Young, Milan <Milan.Young@nuance.com<mailto:Milan.Young@nuance.com>> wrote:
> Maybe I'm missing something here, but a short is going to give us 65k possibilities.  That's the maximum size of an array in many languages.
>
> If a recognition engine can't put the right answer into one of those slots it has bigger problems.

I think Olli's point (please correct me if I'm wrong) was that it's common to use long by default unless there is a specific reason not to.

Thanks,
Hans
Received on Tuesday, 19 June 2012 20:17:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 June 2012 20:17:59 GMT