{
"intent": "id.numbers",
"utterances": [
"my id numbers are @number1 and @number2 ETH"
],
"answers": [ "Your numbers are {number1} and {number2}!" ]
},
{
"intent": "id.numbers",
"utterances": [
"my id numbers are %number% and %number% ETH"
],
"answers": [ "Your numbers are {{[entities.number.items[0].option]}} and {{[entities.number.items[1].option]}}!" ]
}
5条答案
按热度按时间0s0u357o1#
你配置了哪些提取器?你的代码长什么样?你得到了什么响应?请提供更多细节。
aamkag612#
你配置了哪些提取器?你的代码是什么样的?你得到了什么响应?请提供更多详细信息。
代码如下:如果能告诉我我做错了什么,那就太好了。
输出仍然看起来像是字面量"{number1}"或"$number1",或者无论我怎么写,都不像输入中提供的数字。
2fjabf4q3#
请打印出完整结果。我看到你没有初始化任何实体提取器,所以不确定这是否有任何作用。我认为你需要添加一个提取器:https://github.com/axa-group/nlp.js/blob/master/docs/v4/ner-manager.md#built-in-entities ... "default" 或妥协方案应该能够提取数字。
wlwcrazw4#
exclaimer: 我的nlp是德语,所以我必须自己构建数字实体。
要构建数字实体,请查看如何获取尚未具有的单个数字的值。
对于您给我们的例子,您需要这样做。
在这里解释一下:
https://github.com/axa-group/nlp.js/blob/master/docs/v4/slot-filling.md#entities-with-the-same-name
当有多个具有相同名称的实体时,会生成一个列表,对象的结构也不同。
5jdjgkvh5#
对于数字,您仍然可以使用默认的提取器...(也许它只是关于逗号与小数点作为小数分隔符)