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

如何自定义pattern?或者能否增加“近三年”、“三年前”的详细识别? #36

Open
Mozarstra opened this issue Jun 23, 2021 · 1 comment

Comments

@Mozarstra
Copy link

在输入“近三年”和“三年前”的时候,返回的都是timedelta,有没有办法将近三年改为timespan格式?
图片
还有这个bug

@dongrixinyu
Copy link

换一个工具 JioNLP

import jionlp as jio
import time
text = '近三年'
res = jio.parse_time(text, time_base=time.time())
print(res)

# {'type': 'time_span', 'definition': 'blur', 'time': ['2018-06-15 00:00:00', '2021-06-14 01:06:40']}

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