Bot Framework 命名实体

Bot Framework names entities

在google的api.ai中,要处理这样一个句子:

"What is John Doe's email?"

我创建了一个名为 "given-name" 和 "last-name" 的预建实体以获取名称 "John Doe"

如何使用 Microsoft Bot 执行相同的操作 Framework/Luis?

您不使用 Bot Framework 进行操作,不能直接进行。 Bot Framework 可帮助您构建对话流,但没有内置 NLU。您可能会使用 LUIS (also luis.ai) which it supports natively and do your intent detection and entity extraction there. You can also consume your api.ai agent from the Bot Framework if you like. I did that to support a language that LUIS doesn't speak yet (more details - http://www.pveller.com/integrating-bot-framework-with-api-ai/)

更新

扩展我的评论。以下是我如何在我的一个机器人原型中提取 contact 实体。这些是导出的 LUIS 模型中的 JSON 个片段:

"entities": [
    {
      "name": "Contact"
    }
],
"model_features": [
    {
      "name": "Contact",
      "mode": true,
      "words": "John Smith,John Doe,Mary Jay,Robin Smith",
      "activated": true
    }
],
"utterances": [
   {
      "text": "please email to john smith and robin smith",
      "intent": "Email",
      "entities": [
        {
          "entity": "Contact",
          "startPos": 16,
          "endPos": 25
        },
        {
          "entity": "Contact",
          "startPos": 31,
          "endPos": 41
        }
      ]
    }
]

在 Ms LUIS 中,您需要根据您的问题添加话语,并在该短语中分配实体。 您可以参考以下链接。

http://aihelpwebsite.com/Blog/EntryId/4/Creating-Intelligent-Web-Applications-With-LUIS

https://docs.microsoft.com/en-us/azure/cognitive-services/luis/home

希望这个回答对您有所帮助。