0

我正在使用 LUIS 模型(导出为 json 文件)使用命令“rasa train --out models\test.tar.gz”构建 rasa_nlu

Luis 模型具有列表和正则表达式类型的实体,rasa_nlu 模型无法提取这些实体。

例如: LUIS 实体名称:“Animal” LUIS 实体类型:“List” 列表中的元素类似于猫、狗等...

如果我提出“如何训练狗”之类的字符串?

我期望“狗”像 LUIS 一样映射到“动物”实体,但 rasa_nlu 不会将“狗”检测为实体,因为它是“列表”类型。如果实体类型更改为“简单”,rasa_nlu 检测到狗并将其分类为“动物”实体类型

同样,如果 luis 实体类型是由“0x[af,0-9]{8}/i”标识的正则表达式,则 rasa_nlu 无法检测到它。

rasa_nlu 在检测 luis 正则表达式和列出实体类型时是否有任何问题,或者我做错了什么?

以下是用于训练 rasa 的 json 文件的内容

{
  "luis_schema_version": "3.2.0",
  "versionId": "0.1",
  "name": "Test",
  "desc": "",
  "culture": "en-us",
  "tokenizerVersion": "1.0.0",
  "intents": [
    {
      "name": "error"
    },
    {
      "name": "None"
    },
    {
      "name": "wild"
    }
  ],
  "entities": [],
  "composites": [],
  "closedLists": [
    {
      "name": "animal",
      "subLists": [
        {
          "canonicalForm": "dog",
          "list": []
        },
        {
          "canonicalForm": "cat",
          "list": []
        }
      ],
      "roles": []
    }
  ],
  "patternAnyEntities": [],
  "regex_entities": [
    {
      "name": "ecode",
      "regexPattern": "0x[a-f,0-9]{8}",
      "roles": []
    }
  ],
  "prebuiltEntities": [],
  "model_features": [],
  "regex_features": [],
  "patterns": [],
  "utterances": [
    {
      "text": "error 0x80070055",
      "intent": "error",
      "entities": []
    },
    {
      "text": "error while browsing 0x90909090",
      "intent": "error",
      "entities": []
    },
    {
      "text": "how to train cat",
      "intent": "wild",
      "entities": []
    },
    {
      "text": "how to train dog",
      "intent": "wild",
      "entities": []
    }
  ],
  "settings": []
}

感谢你的帮助!

4

0 回答 0