Can grammars include punctuation?

Answers to common Plum DEV questions

Moderators: admin, support

  • Author
  • Message


  • Posts: 3628
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

Can grammars include punctuation?

PostFri Jun 13, 2003 1:54 pm

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

Return to Plum DEV FAQs

Who is online

Users browsing this forum: No registered users and 1 guest