matthewmueller / date

Date() for humans
http://matthewmueller.github.io/date/
1.48k stars 89 forks source link

NLP-time implementation: language normalization #75

Closed kengz closed 8 years ago

kengz commented 8 years ago

This is first of the series of coming NLP-based improvements. This implements a basic normalization module to process string tokens, and map them onto canonical words aka 'lemma', before parsing.

I've added lodash as a requirement. You may wish to add it when publishing the demo site too. There's a list of Issues under work to keep track of next issues to fix. You may wish to update the changelog beneath after approving pr.

Issues fixed: #66, #64, #28, #16, #15, #11, #4

kengz commented 8 years ago

Nodejs v0.6 build fails. I've made it to search for any latest available lodash via npm. Can you take a quick look?

matthewmueller commented 8 years ago

all i have to say is WOW. This is why we open source projects :-D.

We can probably just remove node 0.6 support, but I'll take a look.

kengz commented 8 years ago

Haha exactly why I'm working from this repo too cuz it's MIT.

lodash isn't supported on nodejs earlier than 0.8, here. In fact the official page under Support says Node.js 0.10, 0.12, 4, & 5.

Do you wish to allow for these 4 versions only? Since I doubt that many people use 0.6, 0.8. Let me know if you'd like me to just change the travis.yml

Anyway on rereading your source code it has about 1/3 of the theorem implemented, I'll implement with some pre and post processing and it shall be complete. Then it will be perhaps the most dope time parser out there that is also mathematically proven to be complete.

kengz commented 8 years ago

@matthewmueller thanks for the merge. I'll continue to dev the next 2 phases. Once all is done we can close the open issues.

matthewmueller commented 8 years ago

Love it, I've opened up a separate PR to remove the lodash methods, but feel free to use them in your work, unless you can easily avoid it. I'll go through and see if I can remove them later :-)

matthewmueller commented 8 years ago

okay the website has been updated with your changes. looking forward to the next set of updates :-D