Can I create a local grammar, not using SRGS/GRXML

I've read about SRGS/GRXML and I was wondering if I could create a simpler grammar locally in the code. Below is what I'm trying to do.

food = ['cheeseburger', 'hot dog', 'salad']
{'food':'cheeseburger', 'hot dog', 'salad'}

ask("What food would you like?",
#{'choices': "cheeseburger, hot dog, salad",
{'choices': food,
'onChoice': fill,
'onBadChoice': nomatch,
'onTimeout': noinput })

I'm using Python to write the app and that's why I've tried using a list and dictionary but neither are working.

1 comment

Please sign in to leave a comment.