[BUG] ret_future 与预期不符
beginOfAll opened this issue · comments
描述(Description)
ret_future(bool): 返回偏向未来的时间,如 周一
可按 下周一
进行解析。
今天 2024-04-16
query='五月十号'
ret_future=true, 期望出的是 2024-05-10, 现状却出 2025-05-10
- 版本(Version):
- python 版本: 3.10.10
- jionlp 版本: 1.5.9
- jionlp的调用代码与输入文本(Code & Text):
import jionlp as jio
# now = '2024-04-16 19:59:39'
res = jio.parse_time('五月十号', time_base=datetime.datetime.now(), ret_future=True)
print(res)
# res = {'type': 'time_point', 'definition': 'accurate', 'time': ['2025-05-10 00:00:00', '2025-05-10 23:59:59']}
# 问题:今年五月十号还没到,为什么直接出了明年五月十号?
# 期望:解析为 2024-05-10
把参数设 false就可以了