We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi All! Despite the relatively low number of stars, I think this is the best DateTime NLP out there so kudos!
I think it can really shine itself if supports minutes too to make it more flexible. As currently:
print(timefhuman('2 hours and 30 minutes'))
2021-03-28 02:00:00
Or
print(timefhuman('30 minutes'))
Traceback (most recent call last): File "/Users/Daniyal/Desktop/Test/test.py", line 3, in <module> print(timefhuman('30 minutes')) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/main.py", line 58, in timefhuman tokens = timefhuman_tokens(string, now) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/main.py", line 75, in timefhuman_tokens tokens = categorize(tokens, now) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/categorize.py", line 36, in categorize tokens = substitute_hour_minute_in_remaining(tokens, now) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/categorize.py", line 382, in substitute_hour_minute_in_remaining time_token = extract_hour_minute(token) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/categorize.py", line 316, in extract_hour_minute return TimeToken(relative_hour=hour, minute=minute, time_of_day=time_of_day) File "/Users/Daniyal/opt/anaconda3/lib/python3.8/site-packages/timefhuman/data.py", line 297, in __init__ assert 0 <= self.hour < 24 AssertionError
and
print(timefhuman('One and half hour')) or even print(timefhuman('One hour'))
print(timefhuman('One and half hour'))
print(timefhuman('One hour'))
[]
The text was updated successfully, but these errors were encountered:
I really need this feature too. Is this project abandoned?
Sorry, something went wrong.
No branches or pull requests
Hi All!
Despite the relatively low number of stars, I think this is the best DateTime NLP out there so kudos!
I think it can really shine itself if supports minutes too to make it more flexible. As currently:
Input:
print(timefhuman('2 hours and 30 minutes'))
output:
2021-03-28 02:00:00
Or
Input:
print(timefhuman('30 minutes'))
Output:
and
Input:
print(timefhuman('One and half hour'))
or evenprint(timefhuman('One hour'))
Output:
[]
The text was updated successfully, but these errors were encountered: