Home › Forums › OpenEars plugins › RuleORama grammer structure › Reply To: RuleORama grammer structure
March 22, 2017 at 1:41 pm
#1031698
kdsaft
Participant
Ah, got it! Thank-you!!
I tried this:
let grammar = [
OneOfTheseWillBeSaidOnce : [
[ ThisWillBeSaidOnce : [
[ ThisWillBeSaidOnce : ["HOW MUCH"]],
[ OneOfTheseWillBeSaidOnce : ["FLOUR", "SUGAR", "BUTTER"]]]],
[ ThisWillBeSaidOnce : [
[ ThisWillBeSaidOnce : ["HOW MANY"]],
[ OneOfTheseWillBeSaidOnce : ["EGGS", "APPLES", "PEARS"]]]]
]]
with my expectation that the user could say either “How much flour/sugar/butter” OR “How many eggs/apples/pears”. However from the log it generated:
HOW MUCH BUTTER HOW MANY APPLES
HOW MUCH BUTTER HOW MANY EGGS
HOW MUCH BUTTER HOW MANY PEARS
HOW MUCH FLOUR HOW MANY APPLES
HOW MUCH FLOUR HOW MANY EGGS
HOW MUCH FLOUR HOW MANY PEARS
HOW MUCH SUGAR HOW MANY APPLES
HOW MUCH SUGAR HOW MANY EGGS
HOW MUCH SUGAR HOW MANY PEARS
What did I do wrong?
thanks!
Keith