Skip to content
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

Mistake search_dates for ru language #706

Open
0d1nn opened this issue Jun 11, 2020 · 0 comments
Open

Mistake search_dates for ru language #706

0d1nn opened this issue Jun 11, 2020 · 0 comments
Labels

Comments

@0d1nn
Copy link

0d1nn commented Jun 11, 2020

Hello everyone!

I have an issue with the following example:

search_dates('через 2 часа', languages = ['ru'])    # через 2 часа = in 2 hours
output:  [('2 часа', datetime.datetime(2020, 6, 11, 8, 58, 34, 823410))]
should be: [('через 2 часа', datetime.datetime(2020, 6, 11, 12, 58, 34, 823410))]

The answer is supposed to be "2 hours from now (later)", but it returns "2 hours before now (earlier)".
The thing is, the sentance is exactly following the structure defined in dateparser/dateparser/data/date_translation_data/ru.py , so I'm confused why the error takes place.
I try to figure out the logic of the parser, and so far I understood that for languages other than english it's supposed to return 2 results: one for translated to english sentance, and the other - for the original sentance. Did I get it correctly?

How can it be fixed?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants