3 ms·
The cheap and cheerful way to cheat this problem is to use a restricted grammar that allows synonyms. And one of the many libraries that wrap strptime for date
by olefoo 18y ago
The cheap and cheerful way to cheat this problem is to use a restricted grammar that allows synonyms. And one of the many libraries that wrap strptime for date parsing.
In other words; schedule, remind, tell, add; might all represent the same operation.
If you go this route, do write a BNF grammar, do test with a reasonably large corpus of 'live' requests.
here is a link that should get you started.
http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Parser+Grammars+-+No+Past+Experience+Required http://www.antlr.org/wiki/display/ANTLR3/Quick+Starter+on+Pa...