3 ms·
"Remind" might solve the date side of it, but you'll still need to parse it out. I've thought about a similar thing before and the approach I was looking to tak
by AvengerPenguin 18y ago
"Remind" might solve the date side of it, but you'll still need to parse it out. I've thought about a similar thing before and the approach I was looking to take was using something like: http://www.nltk.org/ http://www.nltk.org/ to create grammar trees (read up on how grammars/parsers work at least on Wikipedia) for an acceptable subset of English.
You might notice things like a time is always after "at", a date "on" and a relative date "in". Ideas for rules:
Event -> Title When
Title -> <anything>
When -> TimeSpecifier When
TimeSpecifier -> "at" Time
TimeSpecifier -> "in" RelativeTime
TimeSpecifier -> "on" Date
...
Then you use semantics stuff to get the parser to return some expression that you can use, say a Python call: event(title=<title>, at=<time>, on=<date>).
Just some things to think about and if you don't know grammars, then read up until you understand the example I gave at least. I just wrote it off the top of my head too, so I'm sure someone might find a mistake with it :-)
p.s. If you're as weird as me, you might even consider Prolog for parsing ;-)