featurevaluedemo.gram
来自「此源代码为java语音识别的开源系统」· GRAM 代码 · 共 53 行
GRAM
53 行
#JSGF V1.0;grammar demo.jsapi.tags.FeatureValueDemo;// Pizza toppings and command.//<pizzaTopping> = cheese | pepperoni | mushrooms | mushroom | onions | onion | sausage;<pizza> = <NULL> { this.toppings = new Array(); } ([and] <pizzaTopping> { this.toppings = this.toppings.concat($.$value); })* (pizza | pie) { this.itemType = "pizza"; } [with] ([and] <pizzaTopping> { this.toppings = this.toppings.concat($.$value); })*;// Burger toppings and command.//<burgerTopping> = onions | pickles | tomatoes | lettuce | cheese;<burgerCondiment> = mayo | relish | ketchup | mustard | special sauce;<burger> = <NULL> { this.toppings = new Array(); } ((burger | hamburger) { this.itemType = "burger"; } | cheeseburger { this.itemType = "burger"; this.toppings = this.toppings.concat("cheese"); } ) [with] ([and] (<burgerTopping> | <burgerCondiment>) { this.toppings = this.toppings.concat($.$value); } )*;public <order> = [I (want | would like) a] ( <pizza> { this.command = "buyPizza"; } | <burger> { this.command = "buyBurger"; } ) { this.item = $; };
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?