diff --git a/Duckling/Time/DE/Corpus.hs b/Duckling/Time/DE/Corpus.hs index 45dbe80f2..ef55cf557 100644 --- a/Duckling/Time/DE/Corpus.hs +++ b/Duckling/Time/DE/Corpus.hs @@ -1158,4 +1158,37 @@ allExamples = concat , examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "Fastenzeit") [ "Fastenzeit 2018" ] + , examples (datetimeHoliday (2018, 1, 6, 0, 0, 0) Day "Heilige drei Könige") + [ "Heilige drei Könige 2018" + ] + , examples (datetimeHoliday (2018, 3, 8, 0, 0, 0) Day "Internationaler Frauentag") + [ "Frauentag 2018" + ] + , examples (datetimeHoliday (2018, 4, 1, 0, 0, 0) Day "Ostersonntag") + [ "Ostersonntag 2018" + ] + , examples (datetimeHoliday (2018, 5, 1, 0, 0, 0) Day "Tag der Arbeit") + [ "Tag der Arbeit 2018" + ] + , examples (datetimeHoliday (2018, 8, 8, 0, 0, 0) Day "Augsburger Friedensfest") + [ "Augsburger Friedensfest 2018" + ] + , examples (datetimeHoliday (2018, 9, 20, 0, 0, 0) Day "Weltkindertag") + [ "Weltkindertag 2018" + ] + , examples (datetimeHoliday (2018, 10, 31, 0, 0, 0) Day "Reformationstag") + [ "Reformationstag 2018" + ] + , examples (datetimeHoliday (2018, 12, 25, 0, 0, 0) Day "Weihnachten") + [ "1. Weihnachtstag 2018" + ] + , examples (datetimeHoliday (2018, 12, 26, 0, 0, 0) Day "2. Weihnachtsfeiertag") + [ "2. Weihnachtstag 2018" + ] + , examples (datetimeHoliday (2018, 2, 12, 0, 0, 0) Day "Rosenmontag") + [ "Rosenmontag 2018" + ] + , examples (datetimeHoliday (2018, 2, 8, 0, 0, 0) Day "Weiberfastnacht") + [ "Weiberfastnacht 2018" + ] ] diff --git a/Duckling/Time/DE/Rules.hs b/Duckling/Time/DE/Rules.hs index 7826d8bba..45d396634 100644 --- a/Duckling/Time/DE/Rules.hs +++ b/Duckling/Time/DE/Rules.hs @@ -86,11 +86,21 @@ ruleHolidays :: [Rule] ruleHolidays = mkRuleHolidays [ ( "Neujahr" , "neujahr(s?tag)?" , monthDay 1 1 ) + , ( "Heilige drei Könige" , "heilige drei könige" + , monthDay 1 6 ) , ( "Valentinstag" , "valentin'?stag" , monthDay 2 14 ) + , ( "Internationaler Frauentag" , "(internationaler )?frauentag" + , monthDay 3 8 ) + , ( "Tag der Arbeit" , "tag der arbeit|maifeiertag" + , monthDay 5 1 ) , ( "Schweizer Bundesfeiertag" , "schweiz(er)? (bundes)?feiertag|bundes feiertag" , monthDay 8 1 ) + , ( "Augsburger Friedensfest" , "augsburger( ?hohes)? friedensfest" + , monthDay 8 8 ) + , ( "Weltkindertag" , "weltkindertag" + , monthDay 9 20 ) , ( "Tag der Deutschen Einheit" , "tag (der)? deutsc?hen? einheit" , monthDay 10 3 ) , ( "Oesterreichischer Nationalfeiertag" @@ -98,14 +108,18 @@ ruleHolidays = mkRuleHolidays , monthDay 10 26 ) , ( "Halloween" , "hall?owe?en?" , monthDay 10 31 ) + , ( "Reformationstag" , "reformationstag" + , monthDay 10 31 ) , ( "Allerheiligen" , "allerheiligen?|aller heiligen?" , monthDay 11 1 ) , ( "Nikolaus" , "nikolaus(tag)?|nikolaus tag|nikolo" , monthDay 12 6 ) , ( "Heiligabend" , "heilig(er)? abend" , monthDay 12 24 ) - , ( "Weihnachten" , "weih?nacht(en|stag)?" + , ( "Weihnachten" , "weih?nacht(en|stag)?|(1\\.|erster) weihnachts(feier)?tag" , monthDay 12 25 ) + , ( "2. Weihnachtsfeiertag" , "(2\\.|zweiter) weihnachts(feier)?tag" + , monthDay 12 26 ) , ( "Silvester" , "silvester" , monthDay 12 31 ) , ( "Muttertag" , "mutt?ertag|mutt?er (tag)?" @@ -120,6 +134,10 @@ ruleComputedHolidays = mkRuleHolidays , cycleNthAfter False TG.Day 39 easterSunday ) , ( "Aschermittwoch", "ascher?(tag|mittwoch)" , cycleNthAfter False TG.Day (-46) easterSunday ) + , ( "Rosenmontag", "rosenmontag" + , cycleNthAfter False TG.Day (-48) easterSunday ) + , ( "Weiberfastnacht", "weiberfastnacht" + , cycleNthAfter False TG.Day (-52) easterSunday ) , ( "Aschura", "asc?hura(\\-?tag)?" , cycleNthAfter False TG.Day 9 muharram ) , ( "Bhai Dooj", "bhai(ya)?\\s+d(u|oo)j|bhau\\-beej|bhai\\s+(tika|phonta)" @@ -239,6 +257,8 @@ ruleComputedHolidays = mkRuleHolidays , "[yj]om hashoah|[yj]om hazikaron lashoah ve-lag'vurah|holocaust\\-?gedenktag" , cycleNthAfter False TG.Day 12 passover ) , ( "Jom Kippur", "[yj]om\\s+kippur", cycleNthAfter False TG.Day 9 roshHashana ) + , ( "Pfingstsonntag", "pfingstsonntag" + , cycleNthAfter False TG.Day 49 easterSunday ) , ( "Pfingstmontag", "pfingstmontag|(pentecost|whit)\\s+montag" , cycleNthAfter False TG.Day 50 easterSunday ) , ( "Rabindra Jayanti", "rabindra(nath)?\\s+jayanti", rabindraJayanti )