shalvah / RemindMeOfThisTweet

🤖 Twitter bot to set reminders for tweets.
https://remindmeofthis.app
GNU General Public License v3.0
417 stars 41 forks source link

Improve date/time parsing #5

Closed shalvah closed 4 years ago

shalvah commented 5 years ago

Here are some requests which fail to parse currently:

shalvah commented 5 years ago

Also, something like "by 12:45 am" used in the middle of the day seems to refer to the past 12:45 instead of wrapping, even though the forwardDate option is specified.

(Edit: Solved in https://github.com/shalvah/RemindMeOfThisTweet/pull/11/commits/788dfc3ec5df5de4c3f9a899b1098152cfeaf60a)

shalvah commented 5 years ago

https://twitter.com/xchurlx/status/1132742758102425604 (Diagnosis: Chrono doesn't recognize the pattern (missing month), so the "27th" is considered as a divider for two date/times. I've disregarded this as an edge case.)

https://twitter.com/Delftsey/status/1148307327340167173?s=19 (Diagnosis: The "." between date and time makes chrono consider them as separate times. Solved in https://github.com/shalvah/RemindMeOfThisTweet/pull/11/commits/632b27531f937e822a543b320452b31555c66a9b)

https://twitter.com/nytafili/status/1148306855753465857?s=19 (Diagnosis: False negative)

https://twitter.com/Dehddy_/status/1148283228119343105?s=19 (Diagnosis: The "by" between "tomorrow" and time makes chrono consider them as separate parts. Solved in https://github.com/shalvah/RemindMeOfThisTweet/pull/11/commits/632b27531f937e822a543b320452b31555c66a9b)

shalvah commented 5 years ago

Solved (mostly) in #11

shalvah commented 5 years ago

https://twitter.com/simi_giwa/status/1150892610334199808?s=19

My guess is: two objects with time. Interesting.

shalvah commented 5 years ago

https://mobile.twitter.com/triplerolex/status/1166069397385076738

tsahi commented 3 years ago

For unexpected formats, you might have better luck using some AI. I've used Azure Cognitive Services successfully: https://azure.microsoft.com/en-us/overview/ they also have a free tier in some regions.

shalvah commented 3 years ago

Maybe, but I think it would be faster with local parsing (plus no rate limits). I'll only switch to an API if there are significant problems

tsahi commented 3 years ago

I meant this link actually: https://azure.microsoft.com/en-us/services/cognitive-services/language-understanding-intelligent-service/ but OK.