LUIS consider TIME and DURATION as number ENTITY

心已入冬 提交于 2019-12-14 03:24:17

问题


I was expecting entities such DATE, TIME, DURATION & No Of People Joining the Call in below JSON.

Now i got entities back such as DATE,TIME and DURATION correctly but for No Of People there is problem for me. I am getting four entities as NUMBER so now i am confused as how to pick exact entity that represent No Of People. Ideally it is No. 6, but i am not getting on which basis i should decide that 6 is the No Of People

{
  "query": "book audio bridge tomorrow for 6 people for 30 mins starts at 5:30 PM",
  "topScoringIntent": {
    "intent": "BookAudioBridge",
    "score": 0.9895838
  },
  "intents": [
    {
      "intent": "BookAudioBridge",
      "score": 0.9895838
    },
    {
      "intent": "ListBooking",
      "score": 0.00677821552
    } 
  ],
  "entities": [
    {
      "entity": "tomorrow",
      "type": "builtin.datetimeV2.date",
      "startIndex": 18,
      "endIndex": 25,
      "resolution": {
        "values": [
          {
            "timex": "2018-06-21",
            "type": "date",
            "value": "2018-06-21"
          }
        ]
      }
    },
    {
      "entity": "30 mins",
      "type": "builtin.datetimeV2.duration",
      "startIndex": 44,
      "endIndex": 50,
      "resolution": {
        "values": [
          {
            "timex": "PT30M",
            "type": "duration",
            "value": "1800"
          }
        ]
      }
    },
    {
      "entity": "5:30 pm",
      "type": "builtin.datetimeV2.time",
      "startIndex": 62,
      "endIndex": 68,
      "resolution": {
        "values": [
          {
            "timex": "T17:30",
            "type": "time",
            "value": "17:30:00"
          }
        ]
      }
    },
    {
      "entity": "6",
      "type": "builtin.number",
      "startIndex": 31,
      "endIndex": 31,
      "resolution": {
        "value": "6"
      }
    },
    {
      "entity": "30",
      "type": "builtin.number",
      "startIndex": 44,
      "endIndex": 45,
      "resolution": {
        "value": "30"
      }
    },
    {
      "entity": "5",
      "type": "builtin.number",
      "startIndex": 62,
      "endIndex": 62,
      "resolution": {
        "value": "5"
      }
    },
    {
      "entity": "30",
      "type": "builtin.number",
      "startIndex": 64,
      "endIndex": 65,
      "resolution": {
        "value": "30"
      }
    }
  ]
}

回答1:


You could build a composite entity of number and simple entity for "people" so that the entity that comes back indicates 6 as number and simple entity name as people.



来源:https://stackoverflow.com/questions/50950519/luis-consider-time-and-duration-as-number-entity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!