我从使用 Bot Framework 和 LUIS 的机器人开始。现在我在理解为什么要使用复合实体时遇到了一些麻烦。到目前为止,我从 LUIS 文档中得到的是复合实体用于将常规实体分组到“类别”下。
例如,如果我的机器人允许用户订购披萨,我将需要三个实体:披萨的数量、大小和披萨的名称。我知道我可以将这些实体分组到一个名为 OrderInformation 的复合实体下。但是我从做这样的事情中得到什么?LUIS 方面的表现?更好的学习?
我问这个是因为这是 LUIS 返回的 JSON。我仍然得到所有常规实体,就像我需要它们一样。
{
"query": "I want to order 3 big pepperoni pizzas",
"intents": [
{
"intent": "OrderFood",
"score": 0.999999046
},
{
"intent": "None",
"score": 0.13833718
},
{
"intent": "FindNews",
"score": 0.0120750656
}
],
"entities": [
{
"entity": "3",
"type": "Number",
"startIndex": 16,
"endIndex": 16,
"score": 0.925765157
},
{
"entity": "big",
"type": "Size",
"startIndex": 18,
"endIndex": 20,
"score": 0.926587939
},
{
"entity": "pepperoni pizzas",
"type": "Food",
"startIndex": 22,
"endIndex": 37,
"score": 0.8726012
},
{
"entity": "3 big pepperoni pizzas",
"type": "Order",
"startIndex": 16,
"endIndex": 37,
"score": 0.8385274
}
],
"compositeEntities": [
{
"parentType": "Order",
"value": "3 big pepperoni pizzas",
"children": [
{
"type": "Number",
"value": "3"
},
{
"type": "Food",
"value": "pepperoni pizzas"
},
{
"type": "Size",
"value": "big"
}
]
}
]
}
复合实体如何让我在机器人方面的生活更轻松?