September 25th, 2008 2 Comments

by Dominique Boucher

4 (not so good) reasons to author grammars in XML

At SpeechTEK University this summer, Judi Halperin from Avaya and Jenni McKienzie from Travelocity gave a very good introduction to grammar writing. The slides are definitely worth reading. They did a good job at addressing the most common sources of problems with speech recognition grammars.

However, two things struck me in their presentation: (1) They use the SRGS XML Form as the authoring language for speech recognition grammars, and (2) They mention JSP or ASP pages as the most common way of dynamically generating grammars. I’ll keep the latter point for another post, but let me address the first point here.

Having long ago abandoned the XML Form in favor of ABNF in our own practice, we’re always intrigued by the fact that a large number of grammar developers - including expert developers like Judi and Jenni - continue using the XML Form (in the case of Judi and Jenni’s presentation, I can see that for a teaching situation with time constraints they would choose GRXML for the examples since more people are familiar with that format and those that aren’t can read it easily, their choice was certainly a conscious decision). Indeed, there is just no question in our mind that ABNF, being so much more compact, readable, and easier to manipulate than the XML Form, is by far the better choice.

I therefore tried to put my feet in the shoes of those developers using the XML Form and understand their motivations. So here’s what I came up with:

  1. XML is the native format for the ASR engine. It’s true that some ASR engines - Nuance’s OSR and Nuance 9 in particular - only support the XML Form. It’s also true that support for the SRGS XML format is required by the specification, while support for ABNF is only optional. But there are format converters out there, so even on these platforms, the ABNF format can be used to author the grammar.
  2. It’s painful having to convert from ABNF to XML all the time. That’s a good point. Many testing tools provided with ASR engines (e.g., parseTool) will require you to convert the grammar to the XML form, which can indeed be painful. This is especially true if conversion tools are not well integrated with the environment in which grammars are being edited.
  3. XML is the format for all documents in the project. I heard this a few times. Some hard-core developers like XML. But that implies that the VUI designer, the speech scientist, or whoever authors the grammars, actually is a software developer. Quite often, that’s not the case.
  4. There is no good ABNF editor. I think this is the crux of the problem. Kind of a chicken and egg situation. No one uses ABNF because there is no good editor and no one provides a good ABNF editor because there is no demand for it. At least, with a decent XML editor, you get syntax coloring, code assist based on the document schema, etc. Unfortunately, an XML editor doesn’t know anything about grammars and therefore cannot provide advanced features like syntax checking of semantic tags, or refactoring capabilities (expansion extraction, rule renaming, semantic slot renaming, etc.).

However valid these points might have been at some point, now that there is a complete environment for developing, testing, and debugging recognition grammars in ABNF format (and exporting them to any target ASR engine), I don’t think there is now any remaining reason for not switching to ABNF. Like, immediately.

Am I missing something? Are there other more fundamental reasons I did not see? Let me know!

I am deeply convinced that once you try authoring your grammars in ABNF using NuGram IDE, you won’t want to get back to your old habits of coding grammars in the XML Form. Give it a try! It’s free. And, by the way, remember that more and more speech recognition engines support ABNF natively.

September 14th, 2008 No Comments

by Dominique Boucher

The best time to migrate to NuGram IDE is NOW

You are at the start of a new VoiceXML project. Or you’ve just completed a project and you are slowly entering maintenance mode. Better yet, you’re in the middle of a large project involving speech recognition grammars. Whatever situation you’re in, now is the best time to migrate to NuGram IDE. You may find that this is one of the best moves you’ve done in a long time. Here is why:

  1. It’s easy. If you haven’t already done so, downloading and installing NuGram IDE takes only a few minutes. Then, converting existing grammars to ABNF (assuming that you don’t already uses the ABNF format) is a matter of seconds. On a .grxml file in the Navigator view, simply right-click on the resource to open the contextual menu, and select “Grammar Tools > Convert to ABNF“. It’s as simple as that. You’re using GSL grammars? Don’t despair! The next release, due real soon, will provide a GSL to ABNF converter.
  2. You’ll increase productivity. Yes, installing NuGram IDE and converting grammars will cost you a few minutes of your time. But you will rapidly recover this investment many times over through increased productivity:
    • NuGram IDE provides many powerful tools to help you edit, debug and maintain your grammars in the same environment as your preferred Eclipse-based service creation environment, be it VoiceObjects Desktop, Cisco CVP Studio, etc.
    • NuGram IDE provides a “builder” that automatically converts ABNF grammars to the format of your choice as soon as you save them. No need to manually convert each grammar one at a time.
  3. You’ll increase quality. NuGram IDE was designed to maximize grammar quality by:
    • Helping you find grammar problems quickly and fix them easily. For instance, the grammar editor instantaneously flags syntax errors with meaningful diagnostic information and the coverage tool enables you to make sure that the grammar hasn’t been accidentally broken.
    • Providing powerful transformation and refactoring tools that always preserve the integrity of the grammar, therefore avoiding tedious and error-prone manipulations. This directly results from the fact that all NuGram IDE tools truly understand the underlying grammar structure since they work on an abstract representation level, not on the textual level.
  4. It’s free. We provide the beta version completely free of charge. And once we reach GA, the Basic Edition will remain free. You just need to register to be able to download new versions of NuGram IDE and be notified of new releases.
  5. There’s no risk. You don’t like using NuGram IDE ? Easy. Just export the grammars to your preferred format and go back to using your old tools. But frankly, we don’t believe you’ll ever want to do that.

So why wait? Register and download NuGram IDE now! Start using it and give us feedback. Help us provide you with the best tools ever for grammar development.