diff --git a/Duckling/Locale.hs b/Duckling/Locale.hs index 65155f8d7..826da7852 100644 --- a/Duckling/Locale.hs +++ b/Duckling/Locale.hs @@ -69,7 +69,8 @@ instance TextShow Lang where -- | ISO 3166-1 alpha-2 Country code (includes regions and territories). -- See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 data Region - = CN + = CA + | CN | GB | HK | MO @@ -100,6 +101,6 @@ makeLocale lang (Just region) allLocales :: HashMap Lang (HashSet Region) allLocales = HashMap.fromList - [ (EN, HashSet.fromList [GB, US]) + [ (EN, HashSet.fromList [CA, GB, US]) , (ZH, HashSet.fromList [CN, HK, MO, TW]) ] diff --git a/Duckling/Ranking/Classifiers/EN_CA.hs b/Duckling/Ranking/Classifiers/EN_CA.hs new file mode 100644 index 000000000..5574da61a --- /dev/null +++ b/Duckling/Ranking/Classifiers/EN_CA.hs @@ -0,0 +1,2349 @@ +-- 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.EN_CA (classifiers) where +import Data.String +import Prelude +import qualified Data.HashMap.Strict as HashMap +import Duckling.Ranking.Types + +classifiers :: Classifiers +classifiers + = HashMap.fromList + [(" to|till|before ", + Classifier{okData = + ClassData{prior = -2.0794415416798357, unseen = -1.791759469228055, + likelihoods = + HashMap.fromList + [("integer (numeric)noon|midnight|EOD|end of day", + -0.916290731874155), + ("hour", -0.916290731874155)], + n = 1}, + koData = + ClassData{prior = -0.13353139262452263, + unseen = -2.890371757896165, + likelihoods = + HashMap.fromList + [("hour", -0.7537718023763802), + ("integer (numeric)time-of-day (latent)", -0.7537718023763802)], + n = 7}}), + ("