Watson Conversation 如何处理复数?

How does Watson Conversation handle plurals?

我刚刚开始使用 Watson Conversation,我有一个基本问题。我使用 "Please play the recipe notes" 和 "Read me the recipe notes" 等多个用户短语设置了一个名为 #play 的意图。我是否还必须考虑单数版本,例如 "Please play the recipe note"?换句话说,是否有更简单的方法来解释用户的单数和复数输入?我发现这个问题与正则表达式有关: 这似乎表明处理这个问题的唯一方法是在意图中输入单数版本,然后添加一个 input.text.matches("notes")在对话框中。这是唯一的解决方案吗?

好的,新手错误。在试用了对话框之后,更重要的是,导入了汽车仪表板应用程序后,我意识到 Conversation 服务结合了意图和实体来确定要做什么。因此,我调整了意图以使用 "Please read the"、"Read the" 等短语。然后实体最终成为 "ingredient",同义词为 "ingredients"、"instruction"加上 "instructions",等等。瞧,它起作用了。事实证明,您只需输入 "ingredients",它仍然有效。如果我仍然无法使用这种方法,我希望有更多经验的人会让我知道...

对于 Intents,您通常不需要考虑复数形式。因此,在您的 Intent 训练中只有 "Please play the recipe notes" 就足以识别 "Please play the recipe note"。更重要的是要有更极端的意图变化,例如 "Read me the recipe note" 和 "Could you read the recipe note."

对于实体,Watson Conversation 当前不支持实体中的复数、拼写错误等,因此如果您希望实体匹配,则需要添加复数作为同义词。