Page 1 of 1

Can grammars include punctuation?

Posted: Fri Jun 13, 2003 1:54 pm
by support
Generally speaking grammars will ignore punctuation. Ignore meaning any punctuation placed in a grammar will be thrown out by the speech recognition engine and no results will ever contain that punctuation.

An example of punctuation being ignored would be:

Code: Select all

<grammar type="application/jsgf">( Hello, World )</grammar>
In this case, the system would look for the utterance "Hello World" and if there is a match for that utterance, it will return a hypothesis of "Hello World".

If it is necessary that the system return punctuation, the use of grammar tags is recommended. In the case of the grammar tags, the grammar engine will look for a match, and then return the contents of the tag in its place.

Code: Select all

<grammar type="application/jsgf">(Hello World){Hello, World}</grammar>
This would match the utterance "Hello World" and return the hypothesis "Hello, World".