Add Guru Gobind Singh Jayanti holiday

Summary: Adding support for Guru Gobind Singh Jayanti holiday from 2000 to 2030.

Reviewed By: chinmay87

Differential Revision: D10148514

fbshipit-source-id: 79e35bcca37f7a87fc6b46fda41edf0a57b424a6
This commit is contained in:
Egxona Ferati 2018-10-03 15:07:08 -07:00 committed by Facebook Github Bot
parent e349942541
commit f2fd05f9c2
17 changed files with 7439 additions and 7098 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2175,6 +2175,13 @@ classifiers
[("hour", -1.3397743454849977),
("integer (numeric)hour (grain)", -1.3397743454849977)],
n = 10}}),
("Guru Gobind Singh Jayanti",
Classifier{okData =
ClassData{prior = -infinity, unseen = -0.6931471805599453,
likelihoods = HashMap.fromList [], n = 0},
koData =
ClassData{prior = 0.0, unseen = -1.9459101490553135,
likelihoods = HashMap.fromList [("", 0.0)], n = 5}}),
("hhmm (latent)",
Classifier{okData =
ClassData{prior = 0.0, unseen = -2.0794415416798357,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13,10 +13,10 @@
-----------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ranking.Classifiers.IS_XX (classifiers) where
import Prelude
import Duckling.Ranking.Types
import qualified Data.HashMap.Strict as HashMap
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import Duckling.Ranking.Types
classifiers :: Classifiers
classifiers = HashMap.fromList []
classifiers = HashMap.fromList []

View File

@ -7,10 +7,10 @@
module Duckling.Time.Computed
( chanukah, chineseNewYear, dhanteras, easterSunday, eidalAdha, eidalFitr
, globalYouthServiceDay, lagBaOmer, mawlid, muharram, navaratri
, orthodoxEaster, passover, rajab, rakshaBandhan, ramadan, roshHashana
, thaiPongal, thiruOnam, tishaBAv, tuBishvat, vasantPanchami, vesak
, yomHaatzmaut, vaisakhi, purim
, globalYouthServiceDay, guruGobindSinghJayanti, lagBaOmer, mawlid, muharram
, navaratri, orthodoxEaster, passover, rajab, rakshaBandhan, ramadan
, roshHashana, thaiPongal, thiruOnam, tishaBAv, tuBishvat, vasantPanchami
, vesak, yomHaatzmaut, vaisakhi, purim
) where
import Data.Maybe
@ -1585,6 +1585,44 @@ globalYouthServiceDay' = mapMaybe toTimeObjectM
, (2018, 4, 20)
]
guruGobindSinghJayanti :: TimeData
guruGobindSinghJayanti = computedDays guruGobindSinghJayanti'
guruGobindSinghJayanti' :: [TimeObject]
guruGobindSinghJayanti' = mapMaybe toTimeObjectM
[ (2000, 1, 14)
, (2001, 1, 2)
, (2002, 1, 21)
, (2003, 12, 29)
, (2004, 1, 5)
, (2005, 1, 16)
, (2006, 12, 27)
, (2007, 1, 5)
, (2008, 1, 14)
, (2009, 12, 23)
, (2010, 1, 5)
, (2011, 1, 5)
, (2012, 1, 5)
, (2013, 1, 18)
, (2014, 1, 7)
, (2015, 1, 5)
, (2016, 1, 16)
, (2017, 12, 25)
, (2018, 1, 5)
, (2019, 1, 13)
, (2020, 2, 1)
, (2021, 1, 19)
, (2022, 1, 8)
, (2023, 1, 5)
, (2024, 1, 17)
, (2025, 1, 5)
, (2026, 1, 5)
, (2027, 1, 14)
, (2028, 1, 3)
, (2029, 1, 5)
, (2030, 1, 10)
]
vesak :: TimeData
vesak = computedDays vesak'

View File

@ -1536,4 +1536,10 @@ allExamples = concat
, examples (datetimeHoliday (2013, 2, 24, 0, 0, 0) Day "Shushan Purim")
[ "Shushan Purim"
]
, examples (datetimeHoliday (2014, 1, 7, 0, 0, 0) Day "Guru Gobind Singh Jayanti")
[ "guru gobind singh birthday"
, "guru gobind singh jayanti 2014"
, "guru gobind singh jayanti"
, "Guru Govind Singh Jayanti"
]
]

View File

@ -1710,6 +1710,9 @@ ruleComputedHolidays = mkRuleHolidays
, cycleNthAfter False TG.Day 3 dhanteras )
, ( "Good Friday", "(good|great|holy)\\s+fri(day)?"
, cycleNthAfter False TG.Day (-2) easterSunday )
, ( "Guru Gobind Singh Jayanti"
, "guru\\s+(gobind|govind)\\s+singh\\s+(birthday|jayanti)"
, guruGobindSinghJayanti )
, ( "Holi", "(rangwali )?holi|dhuleti|dhulandi|phagwah"
, cycleNthAfter False TG.Day 39 vasantPanchami )
, ( "Holika Dahan", "holika dahan|kamudu pyre|chhoti holi"