MycroftAI / lingua-franca

Mycroft's multilingual text parsing and formatting library
Apache License 2.0
75 stars 79 forks source link

extract_datetime_en() fails silently on "<of this/next/last> <year/month/week>", returns wrong datetime #59

Open ChanceNCounter opened 5 years ago

ChanceNCounter commented 5 years ago

https://github.com/MycroftAI/mycroft-core/blob/a3e35d736b0426f33b7fc1d1883be38e4b650b0b/mycroft/util/lang/parse_en.py#L667

Several cases not yet implemented and consequently parsing incorrectly:

ChanceNCounter commented 5 years ago

Thanks to this forum post by user tiredoftry for discovering this via asking about the weather

JarbasAl commented 5 years ago

i think the problem might be somewhere in the nice_date utils, doesn't sound like it is in extract_datetime because "yesterday" wasn't handled at all

fix for extracting "yesterday" and "X days ago" available in lingua_franca

bolt25 commented 5 years ago

i'm able to extract the "X days ago" part but i'm facing issues while dealing with "X days later" but " in X days" works fine. P.S - I'm using SpaCy to process the string

ChanceNCounter commented 4 years ago

Suggest migrating this to Lingua Franca and editing to reflect the parts Jarbas has fixed, unless "yesterday" is regarded as critical enough to warrant porting that fix back here.

forslund commented 4 years ago

Good call. Yesterday we started pushing for getting lingua-franca used directly by core so it's definitely better to continue the work there.

JarbasAl commented 4 years ago

96 closes this