mirror of
https://github.com/facebook/duckling.git
synced 2024-11-28 00:31:28 +03:00
En/Time: Support "Saint" Patrick's Day
Summary: Improved the regex to support "saint" Reviewed By: patapizza Differential Revision: D17327533 fbshipit-source-id: 97b8290c416adbc4b32d543b01f408016c62075a
This commit is contained in:
parent
c9baa741f9
commit
fd8eb2190a
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -2041,8 +2041,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -2005,8 +2005,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -2069,8 +2069,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1983,8 +1983,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -1965,8 +1965,8 @@ classifiers
|
||||
n = 1}}),
|
||||
("St Patrick's Day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
|
@ -914,6 +914,8 @@ allExamples = concat
|
||||
, examples (datetimeHoliday (2013, 3, 17, 0, 0, 0) Day "St Patrick's Day")
|
||||
[ "st patrick's day 2013"
|
||||
, "st paddy's day"
|
||||
, "saint paddy's day"
|
||||
, "saint patricks day"
|
||||
]
|
||||
, examples (datetimeIntervalHoliday ((2018, 2, 14, 0, 0, 0), (2018, 4, 1, 0, 0, 0)) Day "Lent")
|
||||
[ "lent 2018"
|
||||
|
@ -1623,8 +1623,8 @@ rulePeriodicHolidays = mkRuleHolidays
|
||||
, ( "Orthodox New Year", "orthodox new year", monthDay 1 14 )
|
||||
, ( "Public Service Day", "public service day", monthDay 6 23 )
|
||||
, ( "St. George's Day", "(saint|st\\.?) george'?s day|feast of saint george", monthDay 4 23 )
|
||||
, ( "St Patrick's Day", "st\\.? (patrick|paddy)'?s day", monthDay 3 17 )
|
||||
, ( "St. Stephen's Day", "st\\.? stephen'?s day", monthDay 12 26 )
|
||||
, ( "St Patrick's Day", "(saint|st\\.?) (patrick|paddy)'?s day", monthDay 3 17 )
|
||||
, ( "St. Stephen's Day", "(saint|st\\.?) stephen'?s day", monthDay 12 26 )
|
||||
, ( "Time of Remembrance and Reconciliation for Those Who Lost Their Lives during the Second World War", "time of remembrance and reconciliation for those who lost their lives during the second world war", monthDay 5 8 )
|
||||
, ( "Ugadi", "y?ugadi|samvatsaradi|chaitra sukh?ladi", ugadi)
|
||||
, ( "United Nations Day", "united nations day", monthDay 10 24 )
|
||||
|
Loading…
Reference in New Issue
Block a user