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

"半个小时以内"无法识别 #23

Open
shang271828 opened this issue Oct 18, 2019 · 1 comment
Open

"半个小时以内"无法识别 #23

shang271828 opened this issue Oct 18, 2019 · 1 comment

Comments

@shang271828
Copy link

经测试, 可以准确识别 “一个小时以内” “三十分钟以内”,但无法识别“半个小时以内”

另外,如果是“0.5小时以内”,可以识别,但会错误识别为5小时

@dongrixinyu
Copy link

换一个工具,JioNLP

import jionlp as jio
import time
text = '一个小时以内'
print(jio.parse_time(text, time_base=time.time()))
# {'type': 'time_span', 'definition': 'accurate', 'time': ['2021-07-26 14:11:02', '2021-07-26 15:11:59']}

# 半个小时以内、三十分钟以内
# {'type': 'time_span', 'definition': 'accurate', 'time': ['2021-07-26 14:11:40', '2021-07-26 14:41:59']}

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