3 ms·
> I dare say I have not yet seen a single parser in my life that handles such issues. In fact I don't think I've seen a parser that can parse a date interval, o
by monsieurbanana 6y ago
> I dare say I have not yet seen a single parser in my life that handles such issues. In fact I don't think I've seen a parser that can parse a date interval, or that can even do "parse this string assuming it is after that date", or anything like that.
You can google "nlp date extraction" maybe? I've used libraries in the past that do this.
Note: they're far from being perfect. I ended up not using any, as each had their weird corner cases.
Here's an old one: http://natty.joestelmach.com/try.jsp# http://natty.joestelmach.com/try.jsp#
I tried with: "first week of december to end of january"
And it gave me:
Tue Dec 01 15:31:30 UTC 2020
Fri Jan 31 15:31:30 UTC 2020
Edit: this one seems more polished: http://nlp.stanford.edu:8080/sutime/process http://nlp.stanford.edu:8080/sutime/process
- mehrdadn 6y agoCool, thanks for the tip!