我正在使用cmusphinx和Java制作语音识别软件。我的语法看起来像这样:
#JSGF V1.0;
grammar actions;
public <action> = (open| close) (calc| browser) | event (<singular> | <plural>);
<singular> = paste| close | copy;
<plural> = ( a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z)
(zero| one| two|three| four| five| six | seven | eight | nine);
它应该识别诸如event paste
或event a one
之类的东西,但有时我会说event
并得到event two
。或者我说open
并得到open calc
此语法如何接受事件二之类的内容?为什么我只说event
就能认出某些东西?