W3C home > Mailing lists > Public > public-xg-htmlspeech@w3.org > October 2011

RE: builtin grammars

From: Robert Brown <Robert.Brown@microsoft.com>
Date: Wed, 19 Oct 2011 20:12:25 +0000
To: "Olli@pettay.fi" <Olli@pettay.fi>, Michael Bodell <mbodell@microsoft.com>
CC: "public-xg-htmlspeech@w3.org" <public-xg-htmlspeech@w3.org>
Message-ID: <113BCF28740AF44989BE7D3F84AE18DD1B2CFAD6@TK5EX14MBXC112.redmond.corp.microsoft.com>
Michael>> builtin:input?type=text&pattern=%5B0-9%5D%5BA-Z%5D%7B3%7D
Olli> So, is this really something speech engines can support?

I'm wondering that too. I mean, yes it's clearly possible to use a regex as a grammar. But given that SRGS (or proprietary equivalents) and ARPA are the prevalent ways of modeling speech input, I'd be surprised if anybody actually uses regex as a grammar. Still, it should be possible. Whether or not it would be widely implemented is another question.

However, when we see something like "builtin:input?type=text&pattern=%5B0-9%5D%5BA-Z%5D%7B3%7D" I read that as the intersection of two grammars: 1) an ngram model for text input; and 2) a regex to constrain the text to a certain pattern. Either one is okay as a grammar on its own. But what does it mean to combine them? I imagine that the ideal solution is to use the regex to re-weight the ngram model. Making that perform well on demand seems non-trivial. Alternatively, we could perform the ngram recognition first using default weights, then walk the lattice until we found something that fit the regex. That might be easier, but it will be less accurate because we'd be including too much chaff and potentially discarding valid results in the first pass. We'd probably have to use a combination of both techniques. I have no idea how well understood this problem is outside of labs. If this sort of thing is widely implemented, then sure, let's propose a standard way of expressing it in HTML like Michael suggests.

But if not, then I think it's premature to include it. In fact, we might be better off by proposing an extension to the pattern attribute that lets it use an SRGS (XML or ARPA) as an alternative to regex.
Received on Wednesday, 19 October 2011 20:13:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:16:50 UTC