Skip to content

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

@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.

6 participants