1
votes

I have one LUIS model for booking an audio call say "BookAcall" and i have utterances as below" I have used prebuilt entity Number for extracting any numerical entity from the sentence.

Book audio call for 5 people for 2 location

Now, from LUIS json i got two entity as numbers.

  1. 5 and other is 2 but in LUIS there is no way to understand that 5 is no Of people and 2 is no of locations

Need suggestions. Thanks

Below is the screenshot of utterance and Entity, i have used List type entity for No of users. enter image description here

{
  "query": "book a call tomorrow for 5 people for 2 location",
  "topScoringIntent": {
    "intent": "BookACall",
    "score": 0.9560004
  },
  "intents": [
    {
      "intent": "BookACall",
      "score": 0.9560004
    },
    {
      "intent": "CryptoTrading",
      "score": 0.0283502769
    },
    {
      "intent": "None",
      "score": 0.00855541
    }
  ],
  "entities": [
    {
      "entity": "tomorrow",
      "type": "builtin.datetimeV2.date",
      "startIndex": 12,
      "endIndex": 19,
      "resolution": {
        "values": [
          {
            "timex": "2018-06-15",
            "type": "date",
            "value": "2018-06-15"
          }
        ]
      }
    },
    {
      "entity": "location",
      "type": "NoOfLocation",
      "startIndex": 40,
      "endIndex": 47,
      "resolution": {
        "values": [
          "Location"
        ]
      }
    },
    {
      "entity": "people",
      "type": "NoOfUsers",
      "startIndex": 27,
      "endIndex": 32,
      "resolution": {
        "values": [
          "People"
        ]
      }
    },
    {
      "entity": "5",
      "type": "builtin.number",
      "startIndex": 25,
      "endIndex": 25,
      "resolution": {
        "value": "5"
      }
    },
    {
      "entity": "2",
      "type": "builtin.number",
      "startIndex": 38,
      "endIndex": 38,
      "resolution": {
        "value": "2"
      }
    }
  ]
}
3
Are people and location entities?Anita George
I have used NoOfUsers as List type of entity in LUIS as you can see on the screenshotAmol Pawar
So location is also an entity I supposeAnita George
@AnitaGeorge yesAmol Pawar

3 Answers

2
votes

Add a pattern that includes the numbers in the pattern

1
votes

As DFBerry suggested in this SO thread, you can create a composite entity and make number entity and List type entity for user as child entities. And then you can extract the number of user within that composite entity from returned response.

Create a composite entity, like below:

enter image description here

Extract number of user from that composite entity:

enter image description here

0
votes

Book audio call for 5 people for 2 location

Since people and location are entities. You can try to track which number corresponds to people and location by checking the start index and end index of the entities.

Scenarios might be:

Book audio call for 5 people for 2 location Book audio call for 2 location for 5 people

So if you get 2 number type entity and one location type, person type check whether which number occurred first and then which entity whether people or location occurred first. In this way you can do a mapping.