Skip to content

[BUG]解析时间出现的两个问题 #214

Description

@windsunboyu

描述(Description)

解析时间出现的两个问题:一个是字符串里面有“起”导致识别错误,另外一个是将4/5G这种常规字符串识别为0405这种时间

  1. 版本(Version):
  • python 版本: 3.9.10
  • jionlp 版本: 1.5.14
  1. jionlp的调用代码与输入文本(Code & Text):
import jionlp as jio
print("time_pares:{}".format(jio.parse_time("2024年3月31日事件多少起", time_base=time.time())))
print("time_pares:{}".format(jio.parse_time("移动4/5G", time_base=time.time())))
  1. 调用报错日志如下(Log):
time_pares:{'type': 'time_span', 'definition': 'accurate', 'time': ['2024-03-31 00:00:00', '2024-05-24 16:21:42']}
time_pares:{'type': 'time_point', 'definition': 'accurate', 'time': ['2024-04-05 00:00:00', '2024-04-05 23:59:59']}

期望行为(Expectation)

对于第一个输入,期望输出
time_pares:{'type': 'time_span', 'definition': 'accurate', 'time': ['2024-03-31 00:00:00', '2024-03-31 16:21:42']}
对于第二个输入,期望无法解析

请顺手 star 一下右上角的⭐小星星

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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