question

Justin-8140 avatar image
0 Votes"
Justin-8140 asked ramr-msft answered

How to access entities in LUIS Intent Recognition?

In the LUIS examples I have only been able to find the output to console containing the entire intent and entity output, for example calling Properties.GetProperty(PropertyId::LanguageUnderstandingServiceResponse_JsonResult) will return:

RECOGNIZED: Text=Turn off the kitchen lights.
Intent Id: HomeAutomation.TurnOff
Intent Service JSON: {
"query": "turn off the kitchen lights",
"topScoringIntent": {
"intent": "HomeAutomation.TurnOff",
"score": 0.97978586
},
"entities": [
{
"entity": "kitchen",
"type": "HomeAutomation.Location",
"startIndex": 13,
"endIndex": 19,
"score": 0.98807955
},
{
"entity": "lights",
"type": "HomeAutomation.DeviceType",
"startIndex": 21,
"endIndex": 26,
"resolution": {
"values": [
"light"
]
}
}
]
}

Is there a way to access the individual entities for use in my functions using the C++ or Python API, or would I need to access the JSON endpoint and parse the output manually?









azure-cognitive-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered

@Justin-8140 Thanks for the question. You can access the JSON endpoint and parse the output for individual entities.

https://docs.microsoft.com/en-us/azure/cognitive-services/luis/luis-tutorial-node-import-utterances-csv


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.