[英]Can we use wild cards for slot values in Rasa Core Stories?
I'm trying to get a reasonable understanding of how Rasa Core handles stories. 我试图对Rasa Core如何处理故事有一个合理的了解。 I basically have 3 entities -
occasion
, relationship
and gender
我基本上有3个实体-
occasion
, relationship
和gender
Based on the different values of each of these, I'd like to utter certain templates. 基于这些值的不同,我想说出某些模板。 However, there are times when say
occasion
is Christmas
, and no matter what relationship
or gender
slots are filled with, I'd still want to use a certain template. 然而,有些时候,比如说
occasion
是Christmas
,而不管是什么relationship
或gender
插槽都充满了,我还是想用一定的模板。
However, the only way I seem to get around this is by entering all permutation values of relationship
and gender
for a given value of occasion
as Christmas
. 但是,我似乎来解决这个问题的唯一方法是通过输入的所有排列值
relationship
和gender
对于给定值occasion
为Christmas
。
Can I rather use something like this: 我可以使用这样的东西吗?
* suggest {"occasion": "Christmas", "relationship": *, "gender" : *}
I've tried a story line in Rasa with this: 我已经在Rasa中尝试了以下故事情节:
* suggest {"occasion": "Christmas"}
However when I put in a query for "Where would you suggest I should take my brother for Christmas", Rasa NLU identifies the slot occasion
as Christmas
and relationship
as brother
, and my story line is never called, since now relationship
is set to brother
. 但是,当我输入“您建议我应该带我的兄弟去圣诞节的地方”的查询时,Rasa NLU将该广告位
occasion
为Christmas
并将亲戚relationship
为brother
,而我的故事情节从未被调用,因为现在将relationship
设置为brother
。 I wouldn't say its intuitive to permute every possible combination for relationship
with occasion
as Christmas
, rather I'd achieve this programatically through actions then. 我不会说在
Christmas
将每种可能的组合置换成与occasion
relationship
直观的,而是我将通过动作来编程地实现这一目标。 However, I just thought I'd be able to take the benefit of Rasa stories and understand the concept better. 但是,我只是认为我可以利用Rasa的故事并更好地理解这个概念。
Any help will really be appreciated. 任何帮助将不胜感激。
Rasa Core currently does not a functionality for "wildcard" slots. Rasa Core当前没有“通配符”插槽的功能。 However, I am not entirely sure whether this is actually needed.
但是,我不确定是否真的需要这样做。
Case 1: You want to utter different templates depending on which slots are filled. 情况1:您要根据要填充的插槽说出不同的模板。 In this case you have to provide different stories (with the different combinations) to your training data.
在这种情况下,您必须为训练数据提供不同的故事(具有不同的组合)。
Case 2: You don't care whether some slot is filled and want the bot to utter the same template. 情况2:您不在乎是否已填满某个插槽,而希望漫游器说出相同的模板。 In this case I suggest to set the slot type of the ignored slots to
unfeaturized
as it is described here . 在这种情况下,我建议设置忽略时隙的时隙类型
unfeaturized
如它被描述在这里 。 unfeaturized
will mean that is does not affect the stories whether these slots are set. unfeaturized
将意味着是否设置了这些广告位不会影响故事。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.