How do I use compiler options with L&H grammars?
Last reviewed: 7/15/2011
HOW Article ID: H071107
The information in this article applies to:
- Developer Workbench 2011
- GrammarKit 4
- SpeechKit 7
Summary
Chant Developer Workbench 2011, GrammarKit 4, and SpeechKit 7 provide support for VoCon V2, V3, and V4 compiler options.
More Information
Support for VoCon V2, V3, and V4 compiler options has been added to Chant Developer Workbench 2011, GrammarKit 4, and SpeechKit 7.
For L&H BNF V1.0 grammars, the compiler options are one or more of the following:
- Default Behavior - 0 (default)
- Rules Activatable - 1
- Rules Modifiable - 2
- NLU Only - 4
- Optimize - 8
- Remove Phonetic Info - 16
- No Non-Terminal in Modifications - 64
For L&H BNF V1.1 and V2.0 grammars, the compiler options are one of the following:
- Lextreedp - 1 (default)
- Treedp - 2
- Fstdp - 3
- Spelldp - 4
Compiling L&H BNF Grammars with Chant Developer Workbench
Chant Developer Workbench 2011 introduces support for selecting compiler options when compiling. For VoCon 2, the compiler option is a flag value comprised of one or more options. Select a single option from the dropdown list or enter the sum value of the desired options before compiling.
Simply use the dropdown selection list from the Speech toolbar to select compile options before compiling.
Compiling L&H BNF Grammars with GrammarKit
GrammarKit 4 supports compiler option flags on the ChantGM CompileResource and CompileResource2 methods.
Simply pass the desired compiler option as the CompilerOption parameter value when invoking these methods.
Compiling L&H BNF Grammars with SpeechKit
SpeechKit 7 supports compiler option flags on the ChantSR DefineResource method.
Simply pass the desired compiler option as the Option parameter value when invoking this method.