Time/NL: Fix Sinterklaas for Belgium

Summary: In south Netherlands and in Belgium, Sinterklaas is celebrated on December 6.

Reviewed By: mullender

Differential Revision: D8281767

fbshipit-source-id: 4fc71783b9f543c4dfb04b8ba8481935cfb30dd8
This commit is contained in:
Julien Odent 2018-06-05 15:39:57 -07:00 committed by Facebook Github Bot
parent a00a0d7bdf
commit f272a175d4
26 changed files with 2431 additions and 446 deletions

View File

@ -13,7 +13,7 @@
module Duckling.Locale
( Lang(..)
, Locale(..)
, Region(..)
, Region(AU,BE,BZ,CA,CN,GB,HK,IE,IN,JM,MO,NZ,PH,TT,TW,US,ZA)
, allLocales
, makeLocale
) where
@ -28,6 +28,9 @@ import qualified Data.HashMap.Strict as HashMap
import qualified Data.HashSet as HashSet
import qualified TextShow as TS
import Duckling.Region hiding (NL)
import qualified Duckling.Region as R (Region(NL))
-- | ISO 639-1 Language.
-- See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
data Lang
@ -70,30 +73,6 @@ data Lang
instance TextShow Lang where
showb = TS.fromString . show
-- | ISO 3166-1 alpha-2 Country code (includes regions and territories).
-- See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
data Region
= AU
| BZ
| CA
| CN
| GB
| HK
| IE
| IN
| JM
| MO
| NZ
| PH
| TT
| TW
| US
| ZA
deriving (Bounded, Enum, Eq, Generic, Hashable, Ord, Read, Show)
instance TextShow Region where
showb = TS.fromString . show
data Locale = Locale Lang (Maybe Region)
deriving (Eq, Generic, Hashable, Ord)
@ -115,5 +94,6 @@ makeLocale lang (Just region)
allLocales :: HashMap Lang (HashSet Region)
allLocales = HashMap.fromList
[ (EN, HashSet.fromList [AU, BZ, CA, GB, IN, IE, JM, NZ, PH, ZA, TT, US])
, (NL, HashSet.fromList [BE, R.NL])
, (ZH, HashSet.fromList [CN, HK, MO, TW])
]

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -627,29 +627,30 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.12783337150988489,
unseen = -4.672828834461907,
ClassData{prior = -0.12516314295400605,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.120263536200091, unseen = -3.4339872044851463,
ClassData{prior = -2.1400661634962708,
unseen = -3.4339872044851463,
likelihoods =
HashMap.fromList
[("quarter", -2.3025850929940455), ("year", -1.791759469228055),
@ -730,12 +731,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1521,16 +1523,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -629,29 +629,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -725,12 +725,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1495,16 +1496,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -641,29 +641,30 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.12783337150988489,
unseen = -4.672828834461907,
ClassData{prior = -0.12516314295400605,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.120263536200091, unseen = -3.4339872044851463,
ClassData{prior = -2.1400661634962708,
unseen = -3.4339872044851463,
likelihoods =
HashMap.fromList
[("quarter", -2.3025850929940455), ("year", -1.791759469228055),
@ -737,12 +738,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1539,16 +1541,15 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -622,28 +622,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.1670540846631662, unseen = -4.68213122712422,
ClassData{prior = -0.16362942378180204,
unseen = -4.700480365792417,
likelihoods =
HashMap.fromList
[("week", -3.2865344733420154),
("<integer> more <unit-of-duration>", -3.979681653901961),
("three-quarters of an hour", -3.0633909220278057),
("<integer> + '\"", -3.2865344733420154),
("number.number hours", -3.979681653901961),
("second", -3.5742165457937967),
("half a <time-grain>", -3.2865344733420154),
("day", -3.2865344733420154), ("year", -3.979681653901961),
("<integer> <unit-of-duration>", -1.6283063967384832),
("a <unit-of-duration>", -3.0633909220278057),
("quarter of an hour", -3.0633909220278057),
("hour", -2.5933872927820705),
("about|exactly <duration>", -3.979681653901961),
("half an hour (abbrev).", -3.5742165457937967),
("<integer> and an half hour", -3.979681653901961),
("minute", -1.3055330044754323)],
n = 44},
[("week", -3.305053521109253),
("<integer> more <unit-of-duration>", -3.9982007016691985),
("three-quarters of an hour", -3.0819099697950434),
("<integer> + '\"", -3.305053521109253),
("number.number hours", -3.9982007016691985),
("second", -3.592735593561034),
("half a <time-grain>", -3.0819099697950434),
("day", -3.305053521109253), ("year", -3.9982007016691985),
("<integer> <unit-of-duration>", -1.6468254445057207),
("a <unit-of-duration>", -3.0819099697950434),
("quarter of an hour", -3.0819099697950434),
("hour", -2.6119063405493077),
("about|exactly <duration>", -3.9982007016691985),
("half an hour (abbrev).", -3.592735593561034),
("<integer> and an half hour", -3.9982007016691985),
("minute", -1.2901505005669882)],
n = 45},
koData =
ClassData{prior = -1.8718021769015913, unseen = -3.58351893845611,
ClassData{prior = -1.890850371872286, unseen = -3.58351893845611,
likelihoods =
HashMap.fromList
[("quarter", -2.456735772821304), ("year", -1.7635885922613588),
@ -718,12 +719,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1471,16 +1473,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

View File

@ -620,29 +620,29 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("in|within|after <duration>",
Classifier{okData =
ClassData{prior = -0.10763066419236544,
unseen = -4.672828834461907,
ClassData{prior = -0.10536051565782628,
unseen = -4.6913478822291435,
likelihoods =
HashMap.fromList
[("week", -3.2771447329921766),
("<integer> more <unit-of-duration>", -3.970291913552122),
("three-quarters of an hour", -3.054001181677967),
("<integer> + '\"", -3.2771447329921766),
("number.number hours", -3.970291913552122),
("second", -3.5648268054439574),
("half a <time-grain>", -3.2771447329921766),
("day", -3.2771447329921766), ("year", -3.970291913552122),
("<integer> <unit-of-duration>", -1.6189166563886441),
("a <unit-of-duration>", -3.054001181677967),
("quarter of an hour", -3.054001181677967),
("hour", -2.583997552432231),
("about|exactly <duration>", -3.970291913552122),
("half an hour (abbrev).", -3.5648268054439574),
("<integer> and an half hour", -3.970291913552122),
("minute", -1.2961432641255932)],
n = 44},
[("week", -3.295836866004329),
("<integer> more <unit-of-duration>", -3.9889840465642745),
("three-quarters of an hour", -3.0726933146901194),
("<integer> + '\"", -3.295836866004329),
("number.number hours", -3.9889840465642745),
("second", -3.58351893845611),
("half a <time-grain>", -3.0726933146901194),
("day", -3.295836866004329), ("year", -3.9889840465642745),
("<integer> <unit-of-duration>", -1.6376087894007967),
("a <unit-of-duration>", -3.0726933146901194),
("quarter of an hour", -3.0726933146901194),
("hour", -2.6026896854443837),
("about|exactly <duration>", -3.9889840465642745),
("half an hour (abbrev).", -3.58351893845611),
("<integer> and an half hour", -3.9889840465642745),
("minute", -1.2809338454620642)],
n = 45},
koData =
ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474,
ClassData{prior = -2.3025850929940455, unseen = -3.367295829986474,
likelihoods =
HashMap.fromList
[("quarter", -2.2335922215070942), ("year", -1.9459101490553135),
@ -716,12 +716,13 @@ classifiers
likelihoods = HashMap.fromList [], n = 0}}),
("hour (grain)",
Classifier{okData =
ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216,
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
ClassData{prior = -0.48550781578170077,
unseen = -2.890371757896165,
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
koData =
ClassData{prior = -0.8602012652231115,
unseen = -2.5649493574615367,
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
ClassData{prior = -0.9555114450274363,
unseen = -2.4849066497880004,
likelihoods = HashMap.fromList [("", 0.0)], n = 10}}),
("Shavuot",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.0986122886681098,
@ -1461,16 +1462,15 @@ classifiers
n = 3}}),
("half a <time-grain>",
Classifier{okData =
ClassData{prior = -0.2231435513142097,
unseen = -2.3978952727983707,
ClassData{prior = -0.1823215567939546,
unseen = -2.5649493574615367,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),
("hour", -0.6931471805599453)],
n = 4},
n = 5},
koData =
ClassData{prior = -1.6094379124341003,
unseen = -1.6094379124341003,
ClassData{prior = -1.791759469228055, unseen = -1.6094379124341003,
likelihoods =
HashMap.fromList
[("hour (grain)", -0.6931471805599453),

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
-----------------------------------------------------------------
-- Auto-generated by regenClassifiers
--
-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-- @generated
-----------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ranking.Classifiers.NL_NL (classifiers) where
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import Duckling.Ranking.Types
classifiers :: Classifiers
classifiers = HashMap.fromList []

47
Duckling/Region.hs Normal file
View File

@ -0,0 +1,47 @@
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoRebindableSyntax #-}
module Duckling.Region
( Region(..)
) where
import Data.Hashable
import GHC.Generics
import Prelude
import TextShow (TextShow)
import qualified TextShow as TS
-- | ISO 3166-1 alpha-2 Country code (includes regions and territories).
-- See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
data Region
= AU
| BE
| BZ
| CA
| CN
| GB
| HK
| IE
| IN
| JM
| MO
| NL
| NZ
| PH
| TT
| TW
| US
| ZA
deriving (Bounded, Enum, Eq, Generic, Hashable, Ord, Read, Show)
instance TextShow Region where
showb = TS.fromString . show

View File

@ -8,13 +8,14 @@
{-# LANGUAGE GADTs #-}
module Duckling.Rules.NL
( defaultRules
, langRules
, localeRules
) where
import Prelude
import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Types
@ -24,14 +25,18 @@ import qualified Duckling.Duration.NL.Rules as Duration
import qualified Duckling.Numeral.NL.Rules as Numeral
import qualified Duckling.Ordinal.NL.Rules as Ordinal
import qualified Duckling.Time.NL.Rules as Time
import qualified Duckling.Time.NL.BE.Rules as TimeBE
import qualified Duckling.Time.NL.NL.Rules as TimeNL
import qualified Duckling.TimeGrain.NL.Rules as TimeGrain
import qualified Duckling.Volume.NL.Rules as Volume
defaultRules :: Some Dimension -> [Rule]
defaultRules = langRules
defaultRules dim@(This Time) = TimeNL.rulesBackwardCompatible ++ langRules dim
defaultRules dim = langRules dim
localeRules :: Region -> Some Dimension -> [Rule]
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
localeRules BE (This Time) = TimeBE.rules
localeRules _ _ = []
langRules :: Some Dimension -> [Rule]

View File

@ -0,0 +1,27 @@
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.NL.BE.Corpus
( allExamples
) where
import Data.String
import Prelude
import Duckling.Testing.Types hiding (examples)
import Duckling.Time.Corpus
import Duckling.Time.Types hiding (Month)
import Duckling.TimeGrain.Types
allExamples :: [Example]
allExamples = concat
[ examples (datetimeHoliday (2013, 12, 6, 0, 0, 0) Day "Sinterklaas")
[ "Sinterklaas"
]
]

View File

@ -0,0 +1,26 @@
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.NL.BE.Rules
( rules
) where
import Duckling.Time.Helpers
import Duckling.Types
ruleHolidays :: [Rule]
ruleHolidays = mkRuleHolidays
[ ( "Sinterklaas", "sinterklaas", monthDay 12 6 )
]
rules :: [Rule]
rules = ruleHolidays

View File

@ -10,6 +10,7 @@
module Duckling.Time.NL.Corpus
( corpus
, defaultCorpus
, negativeCorpus
) where
@ -29,6 +30,17 @@ context = testContext {locale = makeLocale NL Nothing}
corpus :: Corpus
corpus = (context, testOptions, allExamples)
defaultCorpus :: Corpus
defaultCorpus = (context, testOptions, allExamples ++ custom)
where
custom = concat
[ examples (datetimeHoliday (2013, 12, 5, 0, 0, 0) Day "Sinterklaas")
[ "Sinterklaas"
, "Pakjesavond"
, "Sinterklaasavond"
]
]
negativeCorpus :: NegativeCorpus
negativeCorpus = (context, testOptions, examples)
where
@ -450,11 +462,6 @@ allExamples = concat
, examples (datetimeHoliday (2013, 11, 1, 0, 0, 0) Day "Allerheiligen")
[ "Allerheiligen"
]
, examples (datetimeHoliday (2013, 12, 5, 0, 0, 0) Day "Sinterklaas")
[ "Sinterklaas"
, "Pakjesavond"
, "Sinterklaasavond"
]
, examples (datetimeInterval ((2013, 2, 12, 18, 0, 0), (2013, 2, 13, 0, 0, 0)) Hour)
[ "vanavond"
, "deze avond"

View File

@ -0,0 +1,23 @@
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.NL.NL.Rules
( rulesBackwardCompatible
) where
import Duckling.Time.Helpers
import Duckling.Types
rulesBackwardCompatible :: [Rule]
rulesBackwardCompatible = mkRuleHolidays
[ ( "Sinterklaas", "sinterklaas(avond)?|pakjesavond", monthDay 12 5 )
]

View File

@ -81,30 +81,17 @@ ruleSeasons = mkRuleSeasons
ruleHolidays :: [Rule]
ruleHolidays = mkRuleHolidays
[ ( "Nieuwjaarsdag" , "nieuwjaars?(dag)?"
, monthDay 1 1 )
, ( "Valentijnsdag" , "valentijns?(dag)?"
, monthDay 2 14 )
, ( "Halloween" , "hall?oween?"
, monthDay 10 31 )
, ( "Koningsdag" , "konings?dag"
, monthDay 4 27 )
, ( "Allerheiligen" , "allerheiligen?|aller heiligen?"
, monthDay 11 1 )
, ( "Sinterklaas" , "sinterklaas(avond)?|pakjesavond"
, monthDay 12 5 )
, ( "Kerstavond" , "kerstavond"
, monthDay 12 24 )
, ( "Tweede Kerstdag", "tweede kerstdag"
, monthDay 12 26 )
, ( "Kerstmis" , "kerstmis|(eerste )?kerstdag|kerst"
, monthDay 12 25 )
, ( "Oudjaar" , "oudjaar|oudejaars?avond"
, monthDay 12 31 )
, ( "Moederdag" , "moederdag"
, nthDOWOfMonth 2 7 5 )
, ( "Vaderdag" , "vaderdag"
, nthDOWOfMonth 3 7 6 )
[ ( "Nieuwjaarsdag", "nieuwjaars?(dag)?", monthDay 1 1 )
, ( "Valentijnsdag", "valentijns?(dag)?", monthDay 2 14 )
, ( "Halloween", "hall?oween?", monthDay 10 31 )
, ( "Koningsdag", "konings?dag", monthDay 4 27 )
, ( "Allerheiligen", "allerheiligen?|aller heiligen?", monthDay 11 1 )
, ( "Kerstavond", "kerstavond", monthDay 12 24 )
, ( "Tweede Kerstdag", "tweede kerstdag", monthDay 12 26 )
, ( "Kerstmis", "kerstmis|(eerste )?kerstdag|kerst", monthDay 12 25 )
, ( "Oudjaar", "oudjaar|oudejaars?avond", monthDay 12 31 )
, ( "Moederdag", "moederdag", nthDOWOfMonth 2 7 5 )
, ( "Vaderdag", "vaderdag", nthDOWOfMonth 3 7 6 )
]
ruleRelativeMinutesToOrAfterIntegerPartOfDay :: Rule

View File

@ -31,6 +31,7 @@ library
, Duckling.Engine
, Duckling.Engine.Regex
, Duckling.Locale
, Duckling.Region
, Duckling.Resolve
, Duckling.Types
, Duckling.Types.Document
@ -107,6 +108,8 @@ library
, Duckling.Ranking.Classifiers.MY_XX
, Duckling.Ranking.Classifiers.NB_XX
, Duckling.Ranking.Classifiers.NE_XX
, Duckling.Ranking.Classifiers.NL_BE
, Duckling.Ranking.Classifiers.NL_NL
, Duckling.Ranking.Classifiers.NL_XX
, Duckling.Ranking.Classifiers.PL_XX
, Duckling.Ranking.Classifiers.PT_XX
@ -570,6 +573,9 @@ library
, Duckling.Time.NB.Rules
, Duckling.Time.NL.Corpus
, Duckling.Time.NL.Rules
, Duckling.Time.NL.BE.Corpus
, Duckling.Time.NL.BE.Rules
, Duckling.Time.NL.NL.Rules
, Duckling.Time.PL.Corpus
, Duckling.Time.PL.Rules
, Duckling.Time.PT.Corpus

View File

@ -45,6 +45,7 @@ import qualified Duckling.Time.IT.Corpus as ITTime
import qualified Duckling.Time.KO.Corpus as KOTime
import qualified Duckling.Time.NB.Corpus as NBTime
import qualified Duckling.Time.NL.Corpus as NLTime
import qualified Duckling.Time.NL.BE.Corpus as NL_BETime
import qualified Duckling.Time.PL.Corpus as PLTime
import qualified Duckling.Time.PT.Corpus as PTTime
import qualified Duckling.Time.RO.Corpus as ROTime
@ -157,6 +158,7 @@ getCorpus locale@(Locale lang (Just region)) =
-- | For backward compatibility.
getDefaultCorpusForLang :: Lang -> Corpus
getDefaultCorpusForLang EN = ENTime.defaultCorpus
getDefaultCorpusForLang NL = NLTime.defaultCorpus
getDefaultCorpusForLang lang = getCorpusForLang lang
getCorpusForLang :: Lang -> Corpus
@ -199,6 +201,7 @@ getExamplesForLocale :: Lang -> Region -> [Example]
getExamplesForLocale EN CA = EN_CATime.allExamples
getExamplesForLocale EN GB = EN_GBTime.allExamples
getExamplesForLocale EN US = EN_USTime.allExamples
getExamplesForLocale NL BE = NL_BETime.allExamples
getExamplesForLocale ZH CN = ZH_CNTime.allExamples
getExamplesForLocale ZH HK = ZH_HKTime.allExamples
getExamplesForLocale ZH MO = ZH_MOTime.allExamples

View File

@ -7,18 +7,33 @@
module Duckling.Time.NL.Tests
( tests ) where
( tests
) where
import Data.String
import Prelude
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Testing.Asserts
import Duckling.Testing.Types
import Duckling.Time.NL.Corpus
import qualified Duckling.Time.NL.BE.Corpus as BE
tests :: TestTree
tests = testGroup "NL Tests"
[ makeCorpusTest [This Time] corpus
, makeNegativeCorpusTest [This Time] negativeCorpus
, localeTests
]
localeTests :: TestTree
localeTests = testGroup "Locale Tests"
[ testGroup "NL_BE Tests"
[ makeCorpusTest [This Time] $ withLocale corpus localeBE BE.allExamples
, makeNegativeCorpusTest [This Time] $ withLocale negativeCorpus localeBE []
]
]
where
localeBE = makeLocale NL $ Just BE