如何在调用基本小鸭服务器时传递日期/时间参考?

时间:2017-10-19 23:21:19

标签: wit.ai duckling

关于如何将日期/时间引用传递给基本的vanilla duckling服务器的任何指针?

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

参考日期/时间为我提供了一个锚点,例如"昨天和#34;和"今天。"

例如

参考日期= 2018年4月1日=> " 1周前" = 2018年3月25日。

参考时间= 2018年4月1日,下午3点=> "在8小时内#34; = 2018年4月1日,晚上11点

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

进行调用
dims

但是我找不到更多的例子。我可以在ExampleMain.hs中看到langtext也是locale和{{1}}的参数选项,但参考日期没有。

1 个答案:

答案 0 :(得分:1)

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