LUIS返回DatetimeV2实体,但是我的应用仅接收datetime实体

时间:2018-08-16 13:12:52

标签: botframework luis

如果直接在我的浏览器中输入对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);
    } 

0 个答案:

没有答案