wit.ai - 如何在对基本小鸭服务器的调用中传递日期/时间引用?

标签 wit.ai duckling

关于如何将日期/时间引用传递给基本的 Vanilla 小鸭服务器的任何指示?

我正在使用小鸭来解析文本。在查找时间表达式时,我需要传入一个引用日期/时间。

引用日期/时间为我提供了“昨天”和“今天”等表达的 anchor 。

例如

引用日期 = 2018 年 4 月 1 日 => “1 周前” = 2018 年 3 月 25 日。

引用时间 = 2018 年 4 月 1 日,下午 3 点 =>“8 小时内”= 2018 年 4 月 1 日,晚上 11 点

duckling repo site有关于如何使基本服务器在本地运行的说明,然后您可以调用

curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&text=tomorrow at eight'

但我能找到的例子不多。我可以在ExampleMain.hs中看到那个dimslang也是 text 中的参数选项和 locale ,但在引用日期没有。

最佳答案

curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&text=tomorrow at eight&reftime=<unix epoch in millisecond>'

引用:

https://github.com/facebook/duckling/issues/166

关于wit.ai - 如何在对基本小鸭服务器的调用中传递日期/时间引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46840250/

相关文章:

haskell - Windows 上的 Duckling 安装 - 缺少 C 库 : pcre on windows

haskell - 离线安装和运行 haskell 包

wit.ai - 将数据导入wit.ai

android - 如何在 Android 上使用 wit.ai 获取希伯来语语音输入和输出

ios - 方法未在协议(protocol)中实现(使用 wit.ai SDK)

android - 如何将wit.ai与ogg文件一起使用

javascript - 让聊天机器人 (wit.ai) 回复它没有正确的答案