facebook / facebook/duckling

"before the end of the month" incorrectly parsed

未关闭
#275 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug help wanted
主要语言
Haskell
星标
4.3k
派生
740
PR 合并指标
30 天内没有已合并 PR

描述

Currently a phrase like "before the end of the month" gives an interval as expected, but the end date is not the last day of the month.

Examples:
```
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text=before the end of the month'
[
{
"body": "before the end of the month",
"dim": "time",
"end": 27,
"latent": false,
"start": 0,
"value": {
"to": {
"grain": "day",
"value": "2018-11-21T00:00:00.000-08:00"
},
"type": "interval",
"values": [
{
"to": {
"grain": "day",
"value": "2018-11-21T00:00:00.000-08:00"
},
"type": "interval"
}
]
}
}
]
```

```
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text=before end of dec'
[
{
"body": "before end of dec",
"dim": "time",
"end": 17,
"latent": false,
"start": 0,
"value": {
"to": {
"grain": "day",
"value": "2018-12-21T00:00:00.000-08:00"
},
"type": "interval",
"values": [
{
"to": {
"grain": "day",
"value": "2018-12-21T00:00:00.000-08:00"
},
"type": "interval"
},
{
"to": {
"grain": "day",
"value": "2019-12-21T00:00:00.000-08:00"
},
"type": "interval"
},
{
"to": {
"grain": "day",
"value": "2020-12-21T00:00:00.000-08:00"
},
"type": "interval"
}
]
}
}
]
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。