Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

botframework - LUIS consider TIME and DURATION as number ENTITY

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"
      }
    }
  ]
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...