LUIS - 我可以定义发送给API的消息的时间戳吗?

时间:2018-04-06 14:59:10

标签: nlp luis

我们的英语LUIS模型为相对时间提供了正确的实体builtin.datetimeV2值,如:

  

"一小时前"

有时甚至会发送几天的消息发送到LUIS API。有没有办法在发送请求以从结果中获取正确的时间时如何指定此类消息的原始时间戳?

我看到目前的情况可以在客户端部分处理。它可以比较原始时间戳"输入消息和"实际时间"如果我的程序检测到builtin.datetimeV2的值是相对的,则使用差异来移动结果值。由于必须检测到相对时间"在客户端。

消息的结果示例"一小时前":

"entities": [
    {
      "entity": "an hour ago",
      "type": "builtin.datetimeV2.datetime",
      "startIndex": 48,
      "endIndex": 58,
      "resolution": {
        "values": [
          {
            "timex": "2018-04-06T13:33:15",
            "type": "datetime",
            "value": "2018-04-06 13:33:15"
          }
        ]
      }
    }

1 个答案:

答案 0 :(得分:2)

端点查询字符串需要timezoneOffset,这可以让您改变时间。它并不适用于您的具体情况,但可能有效。