Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
windsunboyu opened this issue May 24, 2024 · 0 comments
Open

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

windsunboyu opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@windsunboyu
Copy link

windsunboyu commented May 24, 2024

描述(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 一下右上角的⭐小星星

@windsunboyu windsunboyu added the bug Something isn't working label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant