【问题标题】:How to correctly use LUIS ML-features?如何正确使用 LUIS ML 功能?
【发布时间】:2020-11-19 09:38:01
【问题描述】:

我刚刚偶然发现 LUIS 中的新“ML 功能”,我不确定我是否真的了解如何正确使用它们。文档对我来说似乎非常抽象和模糊:

https://docs.microsoft.com/de-de/azure/cognitive-services/luis/luis-concept-feature

除了一个很好的一般解释之外,以下示例的解决方案将非常受欢迎:

示例

意图:OpenABox

示例话语:“打开绿色盒子”、“打开天蓝色盒子”。

实体:ColorEntity(无预建实体)。

颜色应理解为“green”、“blue”、“azure”和“olive”,其中“olive”应视为“green”的同义词,“azure”应视为“blue”的同义词。

解决方案建议

我认为你必须这样做

  • 添加意图
  • 添加一个列表实体,列出所有颜色并分配它们的同义词?
  • 添加一个短语列表,它再次列出了一些(但可能不是全部)颜色,而不考虑它们的含义?
  • 让 ML 功能全球化?
  • 将值标记为可互换?
  • 添加 ML 实体,并将列表实体和短语列表分配为特征?
  • 是否需要列表实体功能?
  • 添加示例话语并使用列表实体标记实体?还是使用 ML 实体?还是两者兼有?
  • 将 ML-Entity 作为功能添加到意图?还是词组列表?还是列表实体?还是根本没有?

是否正确,没有办法使用测试面板确认“橄榄”的正确分辨率为其规范形式“绿色”?所以我必须使用API​​来测试这个?

模型

此模型已按上述方式创建。它似乎完成了它的工作。但这真的是最好的方法吗?那里似乎有很多冗余。

{
  "luis_schema_version": "7.0.0",
  "intents": [
    {
      "name": "None",
      "features": []
    },
    {
      "name": "OpenABox",
      "features": [
        {
          "modelName": "ColorMLEntity",
          "isRequired": false
        }
      ]
    }
  ],
  "entities": [
    {
      "name": "ColorMLEntity",
      "children": [],
      "roles": [],
      "features": [
        {
          "featureName": "ColorPhraseList",
          "isRequired": false
        },
        {
          "modelName": "ColorListEntity",
          "isRequired": true
        }
      ]
    }
  ],
  "hierarchicals": [],
  "composites": [],
  "closedLists": [
    {
      "name": "ColorListEntity",
      "subLists": [
        {
          "canonicalForm": "green",
          "list": [
            "olive"
          ]
        },
        {
          "canonicalForm": "blue",
          "list": [
            "azure"
          ]
        }
      ],
      "roles": []
    }
  ],
  "prebuiltEntities": [],
  "utterances": [
    {
      "text": "open the azure box",
      "intent": "OpenABox",
      "entities": [
        {
          "entity": "ColorMLEntity",
          "startPos": 9,
          "endPos": 13,
          "children": []
        }
      ]
    },
    {
      "text": "open the green box",
      "intent": "OpenABox",
      "entities": [
        {
          "entity": "ColorMLEntity",
          "startPos": 9,
          "endPos": 13,
          "children": []
        }
      ]
    }
  ],
  "versionId": "0.1",
  "name": "ColorTest",
  "desc": "",
  "culture": "en-us",
  "tokenizerVersion": "1.0.0",
  "patternAnyEntities": [],
  "regex_entities": [],
  "phraselists": [
    {
      "name": "ColorPhraseList",
      "mode": true,
      "words": "green,blue,azure,olive",
      "activated": true,
      "enabledForAllModels": false
    }
  ],
  "regex_features": [],
  "patterns": [],
  "settings": []
}

【问题讨论】:

    标签: nlp azure-language-understanding nlu


    【解决方案1】:

    特征应该是与意图或实体相关的信号。 所以对于这个例子,

    • 创建 ML 实体“ColorEntity”,
    • 标记话语
    • 将 ColorEntity 添加为意图的功能
    • 然后您可以向 ColorEntity 添加功能,列表实体或短语列表,两者都不需要。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-09-28
      • 1970-01-01
      • 2013-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-28
      相关资源
      最近更新 更多