Skip to content

[BUG] ret_future 与预期不符 #202

@beginOfAll

Description

@beginOfAll

描述(Description)

ret_future(bool): 返回偏向未来的时间,如 周一 可按 下周一 进行解析。
今天 2024-04-16
query='五月十号'
ret_future=true, 期望出的是 2024-05-10, 现状却出 2025-05-10

  1. 版本(Version):
  • python 版本: 3.10.10
  • jionlp 版本: 1.5.9
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions