Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Machine learning 在LUIS中将层次实体用作动作过滤器_Machine Learning_Artificial Intelligence_Azure Language Understanding - Fatal编程技术网

Machine learning 在LUIS中将层次实体用作动作过滤器

Machine learning 在LUIS中将层次实体用作动作过滤器,machine-learning,artificial-intelligence,azure-language-understanding,Machine Learning,Artificial Intelligence,Azure Language Understanding,我在意图上加了一个动作 该操作需要类型为Fruit的参数 水果是一个等级实体[香蕉、橘子、苹果] 我以为当我经过一个苹果时,它会触发那个动作,但它不会,我不知道为什么 已成功匹配意图,但未匹配操作: { "query": "eat an apple", "topScoringIntent": { "intent": "Eat", "score": 0.999997139, "actions": [ { "triggered": fal

我在意图上加了一个动作

该操作需要类型为Fruit的参数

水果是一个等级实体[香蕉、橘子、苹果]

我以为当我经过一个苹果时,它会触发那个动作,但它不会,我不知道为什么

已成功匹配意图,但未匹配操作:

{
  "query": "eat an apple",
  "topScoringIntent": {
    "intent": "Eat",
    "score": 0.999997139,
    "actions": [
      {
        "triggered": false,
        "name": "Eat",
        "parameters": [
          {
            "name": "FruitType",
            "type": "Fruit",
            "required": true,
            "value": null
          }
        ]
      }
    ]
  },
  "intents": [
    {
      "intent": "Eat",
      "score": 0.999997139,
      "actions": [
        {
          "triggered": false,
          "name": "Eat",
          "parameters": [
            {
              "name": "FruitType",
              "type": "Fruit",
              "required": true,
              "value": null
            }
          ]
        }
      ]
    },
    {
      "intent": "None",
      "score": 0.04917145
    }
  ],
  "entities": [
    {
      "entity": "apple",
      "type": "Fruit::apple",
      "startIndex": 7,
      "endIndex": 11,
      "score": 0.916528642
    }
  ],
  "dialog": {
    "prompt": "FruitType missing",
    "parameterName": "FruitType",
    "parameterType": "Fruit",
    "contextId": "1b4333e4-4a00-4714-8041-4b9bacb1feb4",
    "status": "Question"
  }
}
相反,我必须特别使用参数类型fruit::apple,这对我来说是一种挫败

本质上,这个限制意味着我不能有吃水果的意图。

取而代之的是,我不得不吃苹果、香蕉、橘子,这并不是我所想的全部

我做错了吗?还是就是这样?如果是这样的话,那么层次实体的意义何在


我也可以只使用一个普通的旧实体,然后我可以传递任何东西[苹果、香蕉、橙色],但它也会匹配我不想要的[梨]。

您为水果层次实体添加了足够的示例吗?我怎么知道?正如我所说,它与意图相匹配,所以我假设是这样。实际上,实体类型与意图是不同的模型。因此,请确保它与您首先要捕获的话语相匹配,如果不匹配,您需要提供更多我不理解的示例。在两次json转储中,它都表示实体是一个得分为91.6%的水果::苹果。这与实体类型不匹配吗?
{
  "query": "eat an apple",
  "topScoringIntent": {
    "intent": "Eat",
    "score": 0.999997139,
    "actions": [
      {
        "triggered": true,
        "name": "Eat",
        "parameters": [
          {
            "name": "FruitType",
            "type": "Fruit::apple",
            "required": true,
            "value": [
              {
                "entity": "apple",
                "type": "Fruit::apple",
                "resolution": {}
              }
            ]
          }
        ]
      }
    ]
  },
  "intents": [
    {
      "intent": "Eat",
      "score": 0.999997139,
      "actions": [
        {
          "triggered": true,
          "name": "Eat",
          "parameters": [
            {
              "name": "FruitType",
              "type": "Fruit::apple",
              "required": true,
              "value": [
                {
                  "entity": "apple",
                  "type": "Fruit::apple",
                  "resolution": {}
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "intent": "None",
      "score": 0.04917145
    }
  ],
  "entities": [
    {
      "entity": "apple",
      "type": "Fruit::apple",
      "startIndex": 7,
      "endIndex": 11,
      "score": 0.916528642,
      "resolution": {}
    }
  ],
  "dialog": {
    "contextId": "93839bc8-a26a-436b-90c4-842891344ac6",
    "status": "Finished"
  }
}