swirec_max_source_grammar_size

Maximum allowed size of grammars that can be dynamically compiled.

Value

Integer: -1, 1–INT_MAX bytes.

Default

-1 (unlimited)

How to set

In Management Station set on the Nuance recognition service. If not using Management Station, set in a Recognizer configuration file (User-nrsxx.xml).

Usage

Occasionally set by system administrators to force applications to precompile large grammars instead of burdening the runtime system.

Performance

This parameter assumes a general correlation between grammar size and CPU cost. However, grammar efficiency can vary depending on their structure: small source grammars can cause heavy CPU activity, and large source grammars can load at relatively low cost. This parameters is for the general case, and does not address all combinations.

This parameter limits the size of source grammars that can be compiled and loaded at runtime. If a grammar exceeds this value, the Recognizer will compile it (and it cannot be loaded or activated). When the size exceeds the set value, the Recognizer writes the following message to the diagnostic error log:

max source grammar size exceeded for <URI>

This parameter applies to any dynamic compilation of grammars (for example, whenever an application loads, preloads, or activates a grammar that is in source format). It does not affect offline compilation using the sgc compiler, but it does apply to tools such as parseTool and test_parser that compile indirectly.

This parameter does not limit the size of SLM training sets that are trained during dynamic grammar compilation. Use swirec_max_training_grammar_size instead.

The Recognizer evaluates grammar sizes for each URI that needs to be loaded. That means that the size of each individual grammar is considered (and not the accumulated size of all referenced grammars). This parameter does not prevent applications from compiling large grammars that are divided into numerous small grammars.