Utterance file - Truemedia/verbose-utterance GitHub Wiki
Features
Lexicon coverage (Synset) - Implemented
Using a lexicon file (*.lex.txt) generated with a lexicon module which has words group by synonyms with a key called a synset, it is possible to target words using a synset in an expression rather than a word.
Expanding all the possible words with the same meaning eliminates the possibility of a user using a phrase they would expect to be a valid utterance and being disappointed by it not being supported. Typed using synset surround by arrows <>
Example:
(samples/en_GB/salutation.utter)
<arrivalSalutation>
Mixins - Not yet implemented
Repeating an utterance for a different context can be quite useful (especially since the intent name is implied from the utterance file). In instances where only the slot variable names would be different you can prefix the slot variable with a * to imply use as a partial and then call the file using the mixin declaration (square brackets followed by curly brackets) below.
Examples:
(samples/en_GB/info.utter)
tell me about {*Thing}
(samples/en_GB/product.utter)
[info]{ProductName=>Thing,ProductNickname=>Thing}
Slots/dynamic content - Implemented
Dynamic variables that provide data which is prone to constant change. Abstracts information that is inferred from slot files/scripts. Variables are referenced by typing a slot name between curly brackets {}. This information is not actually processed by verbose utterance but is by other libraries that rely on the syntax.
Examples:
(samples/en_GB/purchase.utter)
buy {ProductName}
Symbolic variants - Partially implemented (Japanese only)
With languages like Japanese that have multiple alphabets (hiragana, katakana, kanji), some characters/words are difficult to read and can be written in several different ways. The simplified versions can be produced by working with existing content and producing variants in most scenarios, utilising kuroshiro. Simply add § to the begging of a line or in the header.
Example:
(samples/ja_JP/greeting.utter)
§お早う御座います
Word mangling - Not yet implemented
Prepare for typos by allowing your utterances to be misspelled in several ways using strategies from mispelr module. Simple declare ~ at the beginning of a line or one the first line (treated as a header).
Examples:
(samples/en_GB/spell.utter)
~business
Utterance expansion - Implemented
By wrapping words inside brackets and separating them by a pipe you can list a choice of potential words that could be used as part of an utterance. Optionally make one of the options blank to allow the words to not be required. Uses the Intent utterance expander lib
Example:
(samples/en_GB/launch.utter)
(|play|launch) application