microsoft / Recognizers-Text

Microsoft.Recognizers.Text provides recognition and resolution of numbers, units, date/time, etc. in multiple languages (ZH, EN, FR, ES, PT, DE, IT, TR, HI, NL. Partial support for JA, KO, AR, SV). Packages available at: https://www.nuget.org/profiles/Recognizers.Text, https://www.npmjs.com/~recognizers.text
MIT License
1.68k stars 431 forks source link

[FR - DateTime] Recognize year number #3180

Open quangngoc opened 1 week ago

quangngoc commented 1 week ago

Describe the bug In French, it's common to use "mil" instead of "mille" to denote years in official documents. For instance, "deux juillet deux mil vingt deux" should be interpreted as July 2, 2022. However, this is not recognized correctly

To Reproduce Steps to reproduce the behavior:

  1. Try DateTimeRecognizer.RecognizeDateTime("deux juillet deux mil vingt deux", "fr-fr")
  2. Only "deux juillet" is recognized

Expected behavior It should return 2022-07-02

Platform (please complete the following information):