GSL Grammar Literals
Note | The GSLGrammar is deprecated. That means that, although it can be used, it is restricted. This type of grammar is automatically converted to the SRGSGrammar (Speech Recognition Grammar) format. You must use the SRGSGrammar rather then the GSLGrammar. |
The Nuance GSL (Grammar Specification Language) grammar literal is always of type Grammar.
GSLGrammar:
GSLGrammarDeclarator ComplexLiteralInputChars]
GSLGrammarDeclarator [Expression]
GSLGrammarDeclarator:
any case of GG
GSL grammar literals are used to represent a grammar that supports, in a limited way, the Nuance Grammar Specification Language format. Only one expression is supported; no rule set and it must have a slot named <tag> if used as a main grammar in a recognition.
The ComplexLiteralInputChars can include the [ character as long as it has a balanced number of ] characters: one for every [ character found:
-
If the sequence of characters can be parsed as an Expression of type String or java.io.File, then the resulting grammar is a GSL grammar where the expression specifies the inline content of the grammar or the filename where to retrieve the grammar.
-
If the sequence of characters cannot be parsed properly as described above, then it is considered to be the inline content of the GSL grammar.
Note | Unified CCX does not provide support for Nuance GSL grammars. However to remain backward compatible, the Expression Language still parses and validates these expressions. It is at run time that it is highly likely that an exception would be thrown if the system is unable to convert the GSL grammar into a digit or an SRGS grammar. For more details, see the Cisco MRCP (Media Resource Control Protocol) documentation in the Cisco Unified Contact Center Express Administration and Operations Guide. |
Example GSL Grammar Literals:
GG[hello world]
GG[(i would like [one two three] hamburgers)]
GG[[yes dtmf-1]]
GG[[no dtmf-2]]
GG[[movies sports weather]]
GG[new java.io.File(u"C:\\myGrammar.gsl")]