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

“上(下)季度"查询异常 #25

Closed
Payne214 opened this issue Jul 28, 2021 · 4 comments
Closed

“上(下)季度"查询异常 #25

Payne214 opened this issue Jul 28, 2021 · 4 comments

Comments

@Payne214
Copy link

ValueError: The given time string 上季度 is illegal.

@dongrixinyu
Copy link
Owner

fixed

@Payne214
Copy link
Author

import jionlp as jio
result = jio.parse_time("上季度")
print(result)

Traceback (most recent call last):
File "F:/jio_start.py", line 8, in
result = jio.parse_time("上季度")
File "D:\ProgramData\Miniconda3\envs\py38\lib\site-packages\jionlp\gadget\time_parser.py", line 650, in call
self.parse_time_span_point(time_string)
File "D:\ProgramData\Miniconda3\envs\py38\lib\site-packages\jionlp\gadget\time_parser.py", line 717, in parse_time_span_point
blur_time = self.parse_time_point(
File "D:\ProgramData\Miniconda3\envs\py38\lib\site-packages\jionlp\gadget\time_parser.py", line 1171, in parse_time_point
raise ValueError('can not parse the string {}.'.format(time_string))
ValueError: can not parse the string 上季度.

@dongrixinyu
Copy link
Owner

jio.parse_time('上季度')

{'type': 'time_span', 'definition': 'accurate', 'time': ['2021-04-01 00:00:00', '2021-06-30 23:59:59']}

@Payne214
Copy link
Author

重新安装JioNLP,可以了
非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants