We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Can grammars include punctuation?

Answers to common Plum DEV questions

Moderators: admin, support

Locked
support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Can grammars include punctuation?

Post 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".

Locked