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

Bugfix/NLU-3519: German: invalid date fix #69

Merged
merged 2 commits into from
Apr 19, 2023
Merged

Conversation

andrew-gradinari
Copy link
Collaborator

@andrew-gradinari andrew-gradinari commented Apr 13, 2023

Fix and testing for invalid dates for German.

Details

Invalid dates like "32.04.2023" are being resolved incorrectly as "2023-04-02":

{
  "text": "2.04.",
  "type_name": "datetimeV2.date",
  "start": 1,
  "end": 5,
  "resolution": {
    "values": [
      {
        "timex": "XXXX-04-02",
        "type": "date",
        "value": "2023-04-02"
      },
      {
        "timex": "XXXX-04-02",
        "type": "date",
        "value": "2024-04-02"
      }
    ]
  }
}

This fix changes the resolution of "32.04.2023" to:

{
  "text": "04.2023",
  "type_name": "datetimeV2.daterange",
  "start": 3,
  "end": 9,
  "resolution": {
    "values": [
      {
        "timex": "2023-04",
        "type": "daterange",
        "start": "2023-04-01",
        "end": "2023-05-01"
      }
    ]
  }
}

Probably there should be no match but that is the way MS-Recognizers extracts dates. More info: microsoft#209 and microsoft#1846 (comment)
Created another ticket for this issue - https://inindca.atlassian.net/browse/NLU-3545

@andrew-gradinari
Copy link
Collaborator Author

andrew-gradinari commented Apr 13, 2023

@andrew-gradinari
Copy link
Collaborator Author

MS PR: microsoft#3094

Copy link
Collaborator

@sanhal sanhal left a comment

Choose a reason for hiding this comment

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

Nice work

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

Successfully merging this pull request may close these issues.

5 participants