3

We are using DateTimeV2 French module. The recognition is not working as expected.
We are facing trouble in the following scenario: For query = 13/02/2018, the value recognized is 13th Feb 2018 but if the date specified in less than 12, eg, 09/02/2018, the value recognized is 2nd September 2018. There is a contradiction in these results and we are unable to process them further due to the same.

Please let me know if I am missing something out here or if there is go around for this.

Enrico
  • 108
  • 1
  • 1
  • 11

1 Answers1

2

You are not missing something, there is a bug in the French recognizer, we already experienced the same thing.

Origin of the problem:

In fact the problem seems to be around the order of the detection templates used by the recognizer: in French, dates are written in "day-month-year" format rather than in "month-day-year". But if you have a look to the DateTimeDefinitions for French language here:

public static readonly string DateExtractor4 = $@"\b{MonthNumRegex}\s*[/\\\-]\s*{DayRegex}\s*[/\\\-]\s*{DateYearRegex}";
public static readonly string DateExtractor5 = $@"\b{DayRegex}\s*[/\\\-]\s*{MonthNumRegex}\s*[/\\\-]\s*{DateYearRegex}";

and the way they are used here, the problem will be that your date will fit DateExtractor4 first and the result will be used, whereas it was a value in format DateExtractor5.

Nicolas R
  • 13,812
  • 2
  • 28
  • 57