📦 nlp-time
Time NLP module
Installation
pip install -i https://mirrors.aliyun.com/pypi/simple/ --extra-index-url https://pypi.org/simple/ nlp-time
Example
import nlp_time
from datetime import datetime
res = nlp_time.get_time("我是周六早上6点的飞机")
res = nlp_time.get_time("我是周六早上6点的飞机", tend_future=False)
res = nlp_time.get_text(datetime.strptime("2022-05-22 20:06:00", "%Y-%m-%d %H:%M:%S"))
res = nlp_time.get_text("2022-05-22 20:06:00")
res = nlp_time.get_text("2021-05-22 20:06:00")
res = nlp_time.get_text(1653091200)
res = nlp_time.get_text("2021-05-18 20:06:00")
To Do
- Be the best version of you.
More Resources
License
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.