Meta Data Within Grammars

An advanced option within SRGS grammars is the ability to add metadata to the document. Metadata conveys information about the document itself, rather than being part of the document data.

The following metadata elements are supported within ABNF and GrXML grammars:

ABNF

#ABNF 1.0;

meta "SKIP_DETERMINIZE" is "true";

XML

<?xml version="1.0"?>
<grammar version="1.0" etc...>

  <meta name="SKIP_DETERMINIZE" content="true"/>

</grammar>

SKIP_DETERMINIZE

The SKIP_DETERMINIZE meta declaration controls how the grammar will be compiled. When specified as shown above, it instructs the grammar compiler to skip the determinization step, which is part of the grammar optimization process.

Grammars can still be used when this step is skipped; however, they are less optimal and may use more memory and CPU when performing recognition tasks.

Certain grammars that are sufficiently complex or contain many recursive references may take a very long time and a large amount of memory to complete the determinization step during compilation. This is the primary scenario where skipping this step may be warranted. It is always preferable to allow the grammar to complete determinization during compilation, but for some grammars this may not be practical.

Most grammars will not require this setting and it should only be used when absolutely necessary. Consult with Technical Support for guidance on this setting if needed.

Other Meta Declarations

Additional meta declarations may be documented in future. Any unrecognized meta declarations will have no effect on the overall performance of the grammar.


Was this article helpful?