Time_NLP icon indicating copy to clipboard operation
Time_NLP copied to clipboard

weeks(下周五)无法识别

Open cohakuel opened this issue 6 years ago • 5 comments

image

cohakuel avatar Aug 29 '19 13:08 cohakuel

安装 arrow==0.14.0 解决

bytemain avatar Aug 31 '19 13:08 bytemain

我是macOS系统,安装的arrow是0.14.6,没有找到0.14.0的版本,请问能麻烦给一下0.14.0的安装包吗? 谢谢

在 2019-08-31 21:44:41,"Artin" [email protected] 写道:

安装 arrow==0.14.0 解决

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

cohakuel avatar Sep 01 '19 05:09 cohakuel

pip install arrow==0.14.0

就可以了呀

bytemain avatar Sep 01 '19 05:09 bytemain

新版的 arrow 把 replace 方法中的复数形式都改为了 shift.

兼容了最新版的包 >=0.15 https://github.com/BuddingLab/time_converter

bytemain avatar Oct 06 '19 06:10 bytemain

换一个工具,JioNLP

import jionlp as jio
import time
text = '下周五'
print(jio.parse_time(text, time_base=time.time()))
# {'type': 'time_point', 'definition': 'accurate', 'time': ['2021-08-06 00:00:00', '2021-08-06 23:59:59']}

dongrixinyu avatar Jul 26 '21 06:07 dongrixinyu