-
Notifications
You must be signed in to change notification settings - Fork 10
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
Natural language support #48
Comments
Hey @Nukesor, thanks for reaching out and proposing the idea of adding natural language support, then volunteering to work on it. That's brilliant. I once thought about that at some point, especially when I saw python's dateparser lib, which supports parsing relative dates like what you described. I like your proposed approach: using a separate module, building the parser with Feel free to go ahead and make a changeset for your feature. This repo is still being maintained. It's not hyperactive at the moment, but I always want to focus back on this and iterate on the parsing mechanism to optimize for speed. |
Heyo @waltzofpearls . Turns out, there's a pretty nice and maintained drop-in replacement for chrono-english around named interim. So, I won't work on this any longer as it perfectly fits my own needs for now :) Feel free to close this issue. However, if you're still interested in such functionality, you could think about just using interim as well^^ |
Hey @waltzofpearls,
I'm currently using
chrono-english
, which is a library similar todateparser
. Thechrono-english
maintainer is pretty inactive though and I was about to rewrite his library, when I stumbled upon your library 😁 .I like your architectural approach and I wanted to ask you, whether you could imagine to merge a parser for natural language, such as
3 weeks ago
,in 2 months and 2 days
,friday at 12pm
. I'm currently using this for pueue and would really like to continue using this.There's however an issue with
chrono-english
and some backwards incompatible changes in chrono itself, which lead to compilation errorsMy approach for this would be to use
pest
to create a parser for a well-known syntax.I would create a new module for natural language parsing and a generic trait and a dedicated parser for the english language that implements said trait, so other languages may be added in the future. Those could also be gated behind features.
How do you feel about this? If you think this is worthwhile and that you want to continue maintaining this crate for the forseeable future, I would go ahead and start working on this.
Edit:
Current progress:
https://github.com/Nukesor/dateparser/tree/natural-language
The text was updated successfully, but these errors were encountered: