A BNF grammar file for Xunfei offline command word recognition

A BNF grammar file for Xunfei offline command word recognition

The sample provided by Xunfei has been expanded and the function of controlling home appliances has been added. The actual test is available. For
the grammar format of Xfyun's BNF, please refer to: http://bbs.xfyun.cn/forum.php?mod=viewthread&tid=7595

#BNF+IAT 1.0 UTF-8;
!grammar call;
!slot <want>;
!slot <dialpre>;
!slot <dialsuf>;
!slot <contact>;
!slot <turnOn>;
!slot <machine>;

!start <callstart>;
<callstart>:[<want>]<dial>|[<want>]|<control>;
<dial>:<dialpre><contact>[<dialsuf>];
<control>:<turnOn><machine>|<turnOff><machine>;

<want>:我想|我要||帮我|我想要|请帮我;

<dialpre>:打电话给!id(10001)|打给!id(10001)|拨打!id(10001)|拨打电话给!id(10001)|呼叫!id(10001)|
打一个电话给!id(10001)|打个电话给!id(10001)||拨通!id(10001)|
接通!id(10001)|呼叫!id(10001)|呼叫给!id(10001)|!id(10001);
<dialsuf>:打电话!id(10001)|打个电话!id(10001)|打一个电话!id(10001)|
拨打电话!id(10001)|拨电话!id(10001)|拨个电话!id(10001)|呼个电话!id(10001)|
的电话!id(10001)|的号码!id(10001)|的手机!id(10001)|
的办公电话!id(10001)|的移动号码!id(10001)|的联通号码!id(10001)|
的电信号码!id(10001)|客服电话!id(10001);
<contact>:六一|;

<turnOn>:打开|开一下|开启|启动;
<turnOff>:关闭|关一下|关掉|停止;
<machine>:水泵|电脑;

Guess you like

Origin blog.csdn.net/huzhenwei/article/details/113059715