提取具有相似项目的实体时出现 Dialogflow 问题
Dialogflow issue in extracting entities with similar items
我创建了一个 user-defined/custom 实体作为以下项目的同义词,但 dialogflow 无法识别名称相似但最后只有字符不同的实体。
'STM32L151V8H6'
'STM32L151V8H6A'
'STM32L151V8T6'
'STM32L151V8T6A'
'STM32L151VBH6'
'STM32L151VBH6A'
'STM32L151VBT6'
'STM32L151VBT6A'
所以提取STM32L151VBT6A代替STM32L151VBT6。
请指教如何解决这个问题。
您可以启用模糊匹配:Check docs for more info
或者您可以使用 正则表达式实体:check docs for more info
Some entities need to match patterns rather than specific terms. For example, national identification numbers, IDs, license plates, and so on. With regexp entities, you can provide regular expressions for matching.
更新
在回复您的评论时,您可以获得使用 $EntityName.original 检测到的原始(用户实际所说的)实体(查看下面的示例图片)
但是对于你的用例,我建议不要使用同义词,如果有一个共同的模式,你绝对应该使用 RegEx
我创建了一个 user-defined/custom 实体作为以下项目的同义词,但 dialogflow 无法识别名称相似但最后只有字符不同的实体。
'STM32L151V8H6'
'STM32L151V8H6A'
'STM32L151V8T6'
'STM32L151V8T6A'
'STM32L151VBH6'
'STM32L151VBH6A'
'STM32L151VBT6'
'STM32L151VBT6A'
所以提取STM32L151VBT6A代替STM32L151VBT6。
请指教如何解决这个问题。
您可以启用模糊匹配:Check docs for more info
或者您可以使用 正则表达式实体:check docs for more info
Some entities need to match patterns rather than specific terms. For example, national identification numbers, IDs, license plates, and so on. With regexp entities, you can provide regular expressions for matching.
更新
在回复您的评论时,您可以获得使用 $EntityName.original 检测到的原始(用户实际所说的)实体(查看下面的示例图片)
但是对于你的用例,我建议不要使用同义词,如果有一个共同的模式,你绝对应该使用 RegEx