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

fix MycroftAI/lingua-franca/issues/224 #9

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

NeonJarbas
Copy link

closes #8

@JarbasAl JarbasAl added the bug Something isn't working label Feb 22, 2022
def test_extract_date_years(self):
date = datetime(2017, 6, 27, tzinfo=default_timezone()) # Tue June 27, 2017
self.assertEqual(extract_datetime('in 2007', date)[0],
datetime(2007, 6, 27, tzinfo=date.tzinfo))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should bring this up with users, because there's definitely no correct answer, but this seems jarring to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense if you think deeper about the meaning of anchorDate, but at first it is very jarring at first indeed

regardless im calling this out of scope, this is a quick bugfix only. Keep in mind the full rewrite is still happening so this is a stop gap and i don't want to devote a lot of time to it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it seems like we really want a "granularity" indicator here too - but this is better than what exists.

@ChanceNCounter ChanceNCounter merged commit 0ce7473 into OpenVoiceOS:dev Feb 24, 2022
krisgesling added a commit to MycroftAI/lingua-franca that referenced this pull request Apr 19, 2022
Fixes #224 - extract_datetime parsing of phrases like "in 2007"

Whilst this isn't ideal behaviour, it is better than returning a time.

This is a port of OpenVoiceOS#9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"in 2007" should be parsed as year
4 participants