Skip to content

Commit

Permalink
Time/EN: Vasant Panchami, Holika Dahan, Holi
Browse files Browse the repository at this point in the history
Summary: Moar Hindu holidays.

Reviewed By: chinmay87

Differential Revision: D7704148

fbshipit-source-id: 90fc611021389585c35b667d822cbe67e281d48d
  • Loading branch information
patapizza authored and facebook-github-bot committed Apr 20, 2018
1 parent 5460d8d commit e15efc4
Show file tree
Hide file tree
Showing 16 changed files with 3,861 additions and 3,436 deletions.
550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_AU.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_BZ.hs

Large diffs are not rendered by default.

579 changes: 304 additions & 275 deletions Duckling/Ranking/Classifiers/EN_CA.hs

Large diffs are not rendered by default.

571 changes: 300 additions & 271 deletions Duckling/Ranking/Classifiers/EN_GB.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_IE.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_IN.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_JM.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_NZ.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_PH.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_TT.hs

Large diffs are not rendered by default.

577 changes: 303 additions & 274 deletions Duckling/Ranking/Classifiers/EN_US.hs

Large diffs are not rendered by default.

561 changes: 295 additions & 266 deletions Duckling/Ranking/Classifiers/EN_XX.hs

Large diffs are not rendered by default.

550 changes: 289 additions & 261 deletions Duckling/Ranking/Classifiers/EN_ZA.hs

Large diffs are not rendered by default.

40 changes: 39 additions & 1 deletion Duckling/Time/Computed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Duckling.Time.Computed
( chanukah, chineseNewYear, dhanteras, easterSunday, eidalAdha, eidalFitr
, lagBaOmer, mawlid, muharram, navaratri, orthodoxEaster, passover, rajab
, rakshaBandhan, ramadan, roshHashana, thaiPongal, thiruOnam, tishaBAv
, tuBishvat, yomHaatzmaut
, tuBishvat, vasantPanchami, yomHaatzmaut
) where

import Data.Maybe
Expand Down Expand Up @@ -1531,3 +1531,41 @@ thiruOnam' = mapMaybe toTimeObjectM
, (2029, 8, 22)
, (2030, 9, 9)
]

vasantPanchami :: TimeData
vasantPanchami = computedDays vasantPanchami'

vasantPanchami' :: [TimeObject]
vasantPanchami' = mapMaybe toTimeObjectM
[ (2000, 2, 10)
, (2001, 1, 29)
, (2002, 2, 17)
, (2003, 2, 6)
, (2004, 1, 26)
, (2005, 2, 13)
, (2006, 2, 2)
, (2007, 1, 23)
, (2008, 2, 11)
, (2009, 1, 31)
, (2010, 1, 20)
, (2011, 2, 8)
, (2012, 1, 28)
, (2013, 2, 15)
, (2014, 2, 4)
, (2015, 1, 24)
, (2016, 2, 12)
, (2017, 2, 1)
, (2018, 1, 22)
, (2019, 2, 10)
, (2020, 1, 29)
, (2021, 2, 16)
, (2022, 2, 5)
, (2023, 1, 26)
, (2024, 2, 14)
, (2025, 2, 2)
, (2026, 1, 23)
, (2027, 2, 11)
, (2028, 1, 31)
, (2029, 1, 19)
, (2030, 2, 7)
]
14 changes: 14 additions & 0 deletions Duckling/Time/EN/Corpus.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1370,4 +1370,18 @@ allExamples = concat
, "Thiru Onam 2018"
, "Thiruvonam 2018"
]
, examples (datetimeHoliday (2019, 2, 10, 0, 0, 0) Day "Vasant Panchami")
[ "vasant panchami in 2019"
, "basant panchami 2019"
]
, examples (datetimeHoliday (2019, 3, 20, 0, 0, 0) Day "Holika Dahan")
[ "chhoti holi 2019"
, "holika dahan 2019"
, "kamudu pyre 2019"
]
, examples (datetimeHoliday (2019, 3, 21, 0, 0, 0) Day "Holi")
[ "holi 2019"
, "dhulandi 2019"
, "phagwah 2019"
]
]
5 changes: 5 additions & 0 deletions Duckling/Time/EN/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,10 @@ ruleComputedHolidays = mkRuleHolidays
, cycleNthAfter False TG.Day 3 dhanteras )
, ( "Good Friday", "(good|great|holy)\\s+fri(day)?"
, cycleNthAfter False TG.Day (-2) easterSunday )
, ( "Holi", "(rangwali )?holi|dhuleti|dhulandi|phagwah"
, cycleNthAfter False TG.Day 39 vasantPanchami )
, ( "Holika Dahan", "holika dahan|kamudu pyre|chhoti holi"
, cycleNthAfter False TG.Day 38 vasantPanchami )
, ( "Holy Saturday"
, "(black|holy (and great )?|joyous)sat(urday)?|the great sabbath|easter eve"
, cycleNthAfter False TG.Day (-1) easterSunday )
Expand Down Expand Up @@ -1653,6 +1657,7 @@ ruleComputedHolidays = mkRuleHolidays
, ( "Tisha B'Av", "tisha b'av", tishaBAv )
, ( "Trinity Sunday", "trinity\\s+sunday"
, cycleNthAfter False TG.Day 56 easterSunday )
, ( "Vasant Panchami", "[bv]asant\\s+panchami", vasantPanchami )
, ( "Vijayadashami", "dasara|duss(eh|he)ra|vijayadashami"
, cycleNthAfter False TG.Day 9 navaratri )
-- 15th day of Shevat
Expand Down

0 comments on commit e15efc4

Please sign in to comment.