Menu

JSGF grammar wildcard

Help
Anonymous
2010-05-15
2012-09-22
  • Anonymous

    Anonymous - 2010-05-15

    Is it possible to create a JSGF grammar that includes a wildcard match from
    the LM dictionary? For example, if I want to create a command that says:

    open new documents

    where is any digit between 1-1,000 (for example), is this possible? Or do you
    have to define the grammar by explicitly listing all of the possible numbers,
    i.e. one | two | three | four, etc?

    Similarly, would it be possible for the wildcard to be just '?' where the ?
    can be any word in the dictionary, and I can just parse it at a later time?

    Failing this, what would be the correct way to do this? Would I need to create
    two recognition sessions, one to recognize the start of the command, and the
    other to recognize the dictated speech (which provides the random variable I
    need)?

    Thank You,
    Eric

     
  • Nickolay V. Shmyrev

    Is it possible to create a JSGF grammar that includes a wildcard match from
    the LM dictionary?

    No

    where is any digit between 1-1,000 (for example), is this possible? Or do
    you have to define the grammar by explicitly listing all of the possible
    numbers, i.e. one | two | three | four, etc?

    You need to build a grammar to describe them. For 1-1000 it should be
    something like

    <digit> = (one | two | ..... | ninety)*;
    <number> = <digit> hundred <digit>;
    

    You obviosly don't need to list all 1000 choices

    Similarly, would it be possible for the wildcard to be just '?' where the ?
    can be any word in the dictionary, and I can just parse it at a later time?

    No, its impossible

    Would I need to create two recognition sessions, one to recognize the start
    of the command, and the
    other to recognize the dictated speech (which provides the random variable I
    need)?

    You need to create a grammar to describe your prompts. That's easy thing to
    do. I would recommend you to read some introduction into writing grammar
    (there are many books on that)

    http://www.amazon.com/Art-Business-Speech-Recognition-
    Creating/dp/0321154924

    There are also quite interesting blogs on how to write grammars properly like:

    http://blog.nuecho.com/tag/grammars/

    And you can look on real life grammar examples for IVR systems:

    http://lima-2.speech.cs.cmu.edu/~dhuggins/letsgo_jsgf.tar.bz2

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.