New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NLP fix #2: arithmetics support, complete CFG features (suppressed now) #78
Conversation
…CFG features for compatibility
@matthewmueller Owh forgot to mentioned one thing, it can also take any extra string in a natural sentence, and extract the time. For example if the input string is For this, the CFG is suppressed as I mentioned, so what it does it do some preprocessing on the string (extract Moreover, it can parse normal forms of date string, and e.g. '13 May 2011 01:30 UTC'. The time extraction from arbitrary sentence is a pretty handle feature I think. |
ahh sorry to leave you hanging on this @kengz! this looks great. thanks for your hard work. i'm going to merge this. let me know if you want me to release or if there's more to come before i should release. regarding:
i'm not sure if this is helpful or not, but i think it's usually pretty obvious what the date should be when you think about it, like "tomorrow morning" => some where around 9 or 10 the next day. so i wouldn't worry so much about breaking tests or existing implementation if you think the result will be more expected for folks. |
NLP fix #2: arithmetics support, complete CFG features (suppressed now)
I'll work on it a lil today, but my guess is the next update won't come through until at least next week. I'll let u know tonight if I can finish it? Otherwise assume I can't. |
sure, no rush. loving these fixes :-) |
hey @kengz, what's the state of this? |
oh shoot, my github graph wasn't green for a long time, until recently. Nice timing. Let's see what's left from last time:
|
This fixes issues #70 , #62 , #21
I've removed all
lodash
dependencies, and wrote my own undersubdash
.Also I've finished the CFG implementation, which I call the Human Language for Time. I plan to attach the mathematical proof on the arithmetics and theories behind it soon.
This PR doesn't fix as many problems since there's still several small but pesky issues to resolve, which basically are the inconsistencies between my CFG and the original datejs.
For example, 'tomorrow' will be treated as the next day, defaulted to 9am. Also, I have to implement leap year, and proper carries for days across different months, as they have different number of days.
That's it for now!