Manage grammars

Creating dialog flows for a VoiceXML application? You can use the Grammars tab of the NLU resource panel to export a grammar specification document meant to help design and manage grammars referenced by the application.

A grammar specification document lists all speech and DTMF grammar references found in your dialog design:

  • In question and answer nodes that collect entities whose values are determined by a grammar (as opposed to being subject to NLU)
  • In question and answer nodes that support command overrides, if command entity values are determined by a grammar
  • In your project settings, if you specified global confirmation or global command grammars

The document also includes any DTMF mappings you may have specified in your dialog design, for commands, confirmation, entity values, and command overrides.

A grammar specification document includes these columns:

Column Description
channel Name of a channel, or Global Commands
node name Name of a specific question and answer node, or All Nodes for a global command or confirmation grammar
speech enabled T (true) if the the speech grammar referenced at the specified node is enabled; T (true) for All Nodes, if your project supports a global speech grammar for command or confirmation interactions; otherwise, F (false)
speech grammar name Speech grammar referenced for global command or confirmation interactions, or at the specified question and answer node: either a filename including extension—for example, myGrammar.grxml—or a variable name followed by “(dynamic)"—for example, myGrammar (dynamic)
dtmf enabled T (true) if the the DTMF grammar referenced at the specified node is enabled, in the context of a channel that support DTMF input; T (true) for All Nodes, if your project supports a global DTMF grammar for command or confirmation interactions; otherwise, F (false)
dtmf grammar name DTMF grammar referenced for global command or confirmation interactions, or at the specified question and answer node: either a filename including extension—for example, myDtmfGrammar.grxml—or a variable name followed by “(dynamic)"—for example, myDtmfGrammar (dynamic)
intent For a question and answer node that collects an entity, applicable intent, if any; otherwise, blank
entity name Name of the entity collected at the question and answer node specified under node name; or name of the global command entity (for a global command grammar); or nuance_BOOLEAN (for a global confirmation grammar)—matches the slot/root name that the grammar should return for speech and DTMF
language Language of a literal-value pair for an entity, as a language code (for example, en-US, fr-CA)
entity value A specific entity value
entity literals The literals for the specified entity value, if the specified entity is a list entity
dtmf value The DTMF key, if any, for the specified entity value

Show the Grammars tab of the NLU resource panel

Click NLU, on the toolbar, to open the NLU resource panel, and then switch to the Grammars tab.

(Click NLU again to close the panel.)

Export the grammar specification document

  1. Navigate to the Grammars tab of the NLU resource panel.
  2. If you want to restrict the grammar specification document to a specific channel, choose the desired channel.

    By default, the grammar specification covers all channel in your project.
  3. Click Download Grammar Properties.
    This downloads a CSV file, whose filename has this format: project_timestamp_grammars.csv, where project is the name of your Mix project, and timestamp reflects the current date and time.

Limitation in pre-2016 versions of Microsoft Excel

If your system is set to automatically open CSV files in Excel, special characters and accented letters (such as ¿, é, ó, ç, ø, å, ß, ¡, ô, ò, ñ, ö, Ó, Ô, and Ñ) may appear incorrectly (such as ¿, é, ó, ç, and so on) in generated grammar specification files.

Workaround:

  • Change your system configuration to associate CSV files with a different spreadsheet software, such as OpenOffice Calc or LibreOffice Calc.
  • Upgrade to Office 365 with Office 2016 (or later).