(EN) A method for generating context-free grammar for intent deduction includes: retrieving, through a compiler, a first template file for a respective actionable intent corresponding to a first task thatis to be performed by a machine; parsing the first template file, using the compiler, to identify a first nonterminal variable that refers to a first nonterminal file containing a plurality of first named entity values; and generating, based on a plurality of production rules specified in the first template file, including at least a first production rule that includes the first nonterminal variable, first context-free grammar for the respective actionable intent corresponding to the first task, wherein generating the first context-free grammar for the respective actionable intent corresponding to the first task includes rewriting the first production rule by replacing the first nonterminal variable in the first production rule with the plurality of first named entity values.
(ZH) 一种用于生成用于意图推理的上下文无关文法的方法,包括:针对与待由机器执行的第一任务对应的可操作意图,通过编译器检索第一模板文件;使用编译器解析第一模板文件,以识别第一非终结符变量,第一非终结符变量引用包含多个第一命名实体值的第一非终结符文件;以及基于在第一模板文件中指定的、包括至少第一产生式规则的多个产生式规则,生成与第一任务对应的可操作意图的第一上下文无关文法,第一产生式规则包括第一非终结符变量,其中,生成与第一任务对应的可操作意图的第一上下文无关文法包括:通过用多个第一命名实体值替换第一产生式规则中的第一非终结符变量来重写第一产生式规则。