如果直接在我的浏览器中输入对LUIS的查询,它将返回正确的DatetimeV2实体:
"entities": [
{
"entity": "after 2010",
"type": "builtin.datetimeV2.daterange",
"startIndex": 43,
"endIndex": 52,
"resolution": {
"values": [
{
"timex": "2010",
"Mod": "after",
"type": "daterange",
"start": "2010-12-31"
}
]
}
},
当我在应用中提交相同的查询时,RecognizerResult仅返回:
"datetime": [
{
"type": "daterange",
"timex": [
"2010"
]
}]
我正在使用Microsoft Bot Builder 4.0.1和内置的Luis识别器中间件。这就是我访问RecognizerResult的方式
public static RecognizerResult GetRecognizerResult(ITurnContext context)
{
return context.Services.Get<RecognizerResult>
(LuisRecognizerMiddleware.LuisRecognizerResultKey);
}