[DE DateTimeV2] "dem Jahr" != "this year"
See original GitHub issue@tellarin Hello Börje 😃
Regarding the issue “aus dem Jahr 2012” returning the current year (for the “dem Jahr” portion):
I have identified line 151 in German-DateTime.yaml
for returning the “current time frame” :
ThisRegex: !nestedRegex
def: (((diese((n|m)|(\s*woche))(\s*am)?\s+){WeekDayRegex})|diese(n|r)?\s*(sommer|winter|frühling|herbst))
- The above expression seems correct in that it contains
dieser
but notdem
- However, there is no reference to year here. So I dont really know where the
dem Jahr
behavior is being generated from.
I also found this ⬇️ expression, which contains dem
:
RelativeRegex: !simpleRegex
def: \b(?<order>(über)?nächste[rns]?|kommende[rns]?|diese[rmns]?|vorletzte[snm]?|letzte[rns]?|vergangene[rns]?|vorherige[rns]?|vorige[rns]?|jetzige[rns]?|heutige[rns]?|aktuelle[rns]?|gestrige[rns]?|morgige[rns]?|de[rmsn]|am)
This ⬆️ pattern is referenced by the below ⬇️ expression, maybe it is the cause of the incorrect output:
OneWordPeriodRegex: !nestedRegex
def: \b((((im\s+)?monat\s+)?({RelativeRegex}\s*(jahr\s*(im\s*)?)?)?(?<month>apr(il|\.)|aug(ust|\.)|dez(ember|\.)|feb(ruar|ber|\.)|j[äa]n(uar|ner|\.)|jul(e?i|l\.)|jun([io]|\.)|märz|mai|nov(ember|\.)|okt(ober|\.)|sept?(ember|\.)))|(?<business>unter\s+der\s+woche)|({RelativeRegex}\s+)?((?<business>werktags|arbeitswoche)|woche(nende)?|monat(s)?|jahr)|(monat|jahr))\b
references: [ RelativeRegex, AfterNextSuffixRegex ]
I have confirmed that this problem is still live on LUIS. This is very high priority for me, it would be great if you could change it soon.
In comparison to English, it is basically the same grammar structure; "the year" != "das Jahr"|"dem Jahr"
. the year
needs specification via a year number to make any sense.
Thanks in advance.
Regards
Brian
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
DatetimeV2 Prebuilt entities - LUIS - Azure AI services
The datetimeV2 prebuilt entity extracts date and time values. ... An example is an utterance that includes the month and date without the...
Read more >luis-reference-prebuilt-datetimev2.md
Contribute to MicrosoftDocs/azure-docs.de-de development by creating an account ... Ein Datum oder einen Datumsbereich, bei dem das Jahr nicht eindeutig ist ...
Read more >Function Reference (German)
Gibt das letzte date in dem Jahr zurück, in das ein date fällt. TagDifferenz(<date/datetime1>, <date/datetime2>) die Anzahl der [ganzen]Tage von <date1> bis ...
Read more >Converting timestamp to time ago in PHP e.g 1 day ago, 2 ...
Whilst I prefer the DateTime method posting here, I didn't like the fact it displayed 0 years etc. /* * Returns a string...
Read more >Microsoft Access - Neue Features in 2020 - Pläne für 2021
Immerhin war Microsoft Access da ein kleiner Lichtblick. ... Jetzt wird DateTime2 dem neuen erweiterten Datums- / Uhrzeittyp in Access ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok, I will try to implement this logic only in German for now, let see what @tellarin says about the English case.
@LionbridgeCSII
Thanks for the info on the timeframe 😃
But why do you map “the year” to the current year? The only case I can think of for this is “Film of the year”. But this is only for the case “of the year”|“des Jahres”. This does not apply to a sentence like “Show me a film from the year”. This last example is underspecified and the listener would ask “What year exactly?”
Primarily, we want to ensure that “Films from the year 2012” does not return the current year. But if the user says “Show me a film from the year”, we also dont want the current year returned, because this information is not included in the sentence (a different case than “Film of the year”
This above described behavior is what we want for German, but like I said, I personally think it should be the same for English.