mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
Chinese locales + fix TW National Day
Summary: * Moving `ruleNationalDay` from `ZH` rules to specific locales: `zh_CN`, `zh_HK`, `zh_MO` * Fixed National Day for `zh_TW`. Reviewed By: blandinw Differential Revision: D6057565 fbshipit-source-id: 8f9f2ab
This commit is contained in:
parent
33a08bb76b
commit
fb1dcaa138
@ -12,15 +12,17 @@ module Duckling.Duration.ZH.Corpus
|
||||
( corpus
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.String
|
||||
import Prelude
|
||||
|
||||
import Duckling.Duration.Types
|
||||
import Duckling.Locale
|
||||
import Duckling.Resolve
|
||||
import Duckling.Testing.Types
|
||||
import Duckling.TimeGrain.Types (Grain(..))
|
||||
|
||||
corpus :: Corpus
|
||||
corpus = (testContext, allExamples)
|
||||
corpus = (testContext {locale = makeLocale ZH Nothing}, allExamples)
|
||||
|
||||
allExamples :: [Example]
|
||||
allExamples = concat
|
||||
|
@ -69,7 +69,11 @@ 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
|
||||
= GB
|
||||
= CN
|
||||
| GB
|
||||
| HK
|
||||
| MO
|
||||
| TW
|
||||
| US
|
||||
deriving (Bounded, Enum, Eq, Generic, Hashable, Ord, Read, Show)
|
||||
|
||||
@ -97,4 +101,5 @@ makeLocale lang (Just region)
|
||||
allLocales :: HashMap Lang (HashSet Region)
|
||||
allLocales = HashMap.fromList
|
||||
[ (EN, HashSet.fromList [GB, US])
|
||||
, (ZH, HashSet.fromList [CN, HK, MO, TW])
|
||||
]
|
||||
|
879
Duckling/Ranking/Classifiers/ZH_CN.hs
Normal file
879
Duckling/Ranking/Classifiers/ZH_CN.hs
Normal file
@ -0,0 +1,879 @@
|
||||
-- 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.ZH_CN (classifiers) where
|
||||
import Data.String
|
||||
import Prelude
|
||||
import qualified Data.HashMap.Strict as HashMap
|
||||
import Duckling.Ranking.Types
|
||||
|
||||
classifiers :: Classifiers
|
||||
classifiers
|
||||
= HashMap.fromList
|
||||
[("<time> timezone",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> am|pm", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Thursday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (numeric)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.5020919437972361, unseen = -3.871201010907891,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 46},
|
||||
koData =
|
||||
ClassData{prior = -0.9295359586241757,
|
||||
unseen = -3.4657359027997265,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 30}}),
|
||||
("the day before yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("today",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.6094379124341003,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -0.2231435513142097, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4}}),
|
||||
("absorption of , after named day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.833213344056216,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.6931471805599453), ("Sunday", -0.6931471805599453)],
|
||||
n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tonight",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("October",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("month (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.9808292530117262, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -0.4700036292457356,
|
||||
unseen = -3.7376696182833684,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 40}}),
|
||||
("<time-of-day> o'clock",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4418327522790392, unseen = -3.044522437723423,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -1.0296194171811581,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 5}}),
|
||||
("national day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3025850929940455,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.9444389791664407,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 17},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hour (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4367176516122688, unseen = -4.624972813284271,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -3.5165082281731497),
|
||||
("year (numeric with year symbol)<named-month> <day-of-month>",
|
||||
-1.5705980791178364),
|
||||
("dayday", -1.9070703157390494),
|
||||
("hourhour", -3.005682604407159),
|
||||
("hourminute", -3.5165082281731497),
|
||||
("absorption of , after named day<named-month> <day-of-month>",
|
||||
-1.9070703157390494),
|
||||
("dayminute", -3.5165082281731497),
|
||||
("tonight<time-of-day> o'clock", -3.005682604407159),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.5165082281731497),
|
||||
("yearday", -1.5705980791178364)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -1.0388930539664873,
|
||||
unseen = -4.1588830833596715,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -2.1972245773362196),
|
||||
("dayhour", -2.5336968139574325),
|
||||
("daymonth", -2.063693184711697),
|
||||
("year (numeric with year symbol)February", -3.044522437723423),
|
||||
("<dim time> <part-of-day><time-of-day> o'clock",
|
||||
-3.044522437723423),
|
||||
("hourhour", -3.044522437723423),
|
||||
("year (numeric with year symbol)March", -2.5336968139574325),
|
||||
("hourminute", -3.044522437723423),
|
||||
("yearmonth", -2.1972245773362196),
|
||||
("dayminute", -3.044522437723423),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.044522437723423),
|
||||
("absorption of , after named dayFebruary",
|
||||
-2.063693184711697)],
|
||||
n = 23}}),
|
||||
("year (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8209805520698302,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 11},
|
||||
koData =
|
||||
ClassData{prior = -0.579818495252942, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 14}}),
|
||||
("Saturday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("last tuesday, last july",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("next <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.7472144018302211,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.6418538861723948, unseen = -3.295836866004329,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8602012652231115),
|
||||
("week (grain)", -0.8602012652231115)],
|
||||
n = 10}}),
|
||||
("last year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.970291913552122,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.8718021769015913),
|
||||
("Monday", -1.8718021769015913), ("day", -0.7323678937132265),
|
||||
("Tuesday", -1.5533484457830569)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yyyy-mm-dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd/yyyy",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("evening|night",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Monday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hh:mm (time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<integer> (latent time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.3217558399823195,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.2809338454620642),
|
||||
("integer (0..10)", -0.325422400434628)],
|
||||
n = 16},
|
||||
koData =
|
||||
ClassData{prior = -0.3101549283038396,
|
||||
unseen = -3.8501476017100584,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -2.2192034840549946),
|
||||
("integer (0..10)", -0.11506932978478723)],
|
||||
n = 44}}),
|
||||
("nth <time> of <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Octoberordinal (digits)Monday", -1.3350010667323402),
|
||||
("monthday", -0.7472144018302211),
|
||||
("month (numeric with month symbol)ordinal (digits)Monday",
|
||||
-1.3350010667323402)],
|
||||
n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (numeric with month symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.13976194237515874,
|
||||
unseen = -3.7612001156935624,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.0296194171811581),
|
||||
("integer (0..10)", -0.4418327522790392)],
|
||||
n = 40},
|
||||
koData =
|
||||
ClassData{prior = -2.03688192726104, unseen = -2.1972245773362196,
|
||||
likelihoods =
|
||||
HashMap.fromList [("integer (0..10)", -0.13353139262452263)],
|
||||
n = 6}}),
|
||||
("week (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8434293836092833,
|
||||
unseen = -3.6635616461296463,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 37},
|
||||
koData =
|
||||
ClassData{prior = -0.5625269981428811,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 49}}),
|
||||
("valentine's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("year (numeric with year symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.4849066497880004,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("numbers prefix with -, negative or minus",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 4}}),
|
||||
("Friday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.1780538303479458,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.3437347467010947),
|
||||
("day", -0.7375989431307791), ("Tuesday", -1.3437347467010947)],
|
||||
n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Sunday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("afternoon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3978952727983707,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 9},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> from now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("February",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("this <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.0185695809945732,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.916290731874155),
|
||||
("year (grain)", -2.3025850929940455),
|
||||
("week (grain)", -0.916290731874155),
|
||||
("year", -2.3025850929940455)],
|
||||
n = 13},
|
||||
koData =
|
||||
ClassData{prior = -0.4480247225269604,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.7339691750802004),
|
||||
("week (grain)", -0.7339691750802004)],
|
||||
n = 23}}),
|
||||
("minute (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<dim time> <part-of-day>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.9889840465642745,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("dayhour", -0.7514160886839211),
|
||||
("national dayevening|night", -2.871679624884012),
|
||||
("<named-month> <day-of-month>morning", -1.405342556090585),
|
||||
("children's dayafternoon", -2.871679624884012),
|
||||
("Mondaymorning", -1.7730673362159024)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<part-of-day> <dim time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.587786664902119, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("tonight<integer> (latent time-of-day)", -2.2617630984737906),
|
||||
("hourhour", -1.1631508098056809),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-2.0794415416798357),
|
||||
("afternoon<time-of-day> o'clock", -2.4849066497880004),
|
||||
("hourminute", -1.9252908618525775),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-2.4849066497880004),
|
||||
("afternoonhh:mm (time-of-day)", -3.1780538303479458),
|
||||
("tonight<time-of-day> o'clock", -2.2617630984737906)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -0.8109302162163288, unseen = -3.713572066704308,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hourhour", -1.2039728043259361),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-1.8971199848858813),
|
||||
("afternoon<time-of-day> o'clock", -1.8971199848858813),
|
||||
("hourminute", -1.8971199848858813),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-1.742969305058623)],
|
||||
n = 16}}),
|
||||
("<integer> <unit-of-duration>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -5.877735781779639,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.6560549059838294),
|
||||
("integer (0..10)month (grain)", -2.068268241081711),
|
||||
("integer (0..10)hour (grain)", -2.8304082931286074),
|
||||
("second", -3.235873401236772),
|
||||
("integer (0..10)day (grain)", -3.0417173867958143),
|
||||
("integer (0..10)year (grain)", -3.572345637857985),
|
||||
("integer (numeric)year (grain)", -3.1668805297498204),
|
||||
("integer (0..10)second (grain)", -3.235873401236772),
|
||||
("day", -3.0417173867958143), ("year", -2.6968769005040847),
|
||||
("integer (0..10)minute (grain)", -3.0417173867958143),
|
||||
("hour", -2.8304082931286074),
|
||||
("integer (0..10)week (grain)", -2.6560549059838294),
|
||||
("month", -1.7973932869463112),
|
||||
("integer (numeric)month (grain)", -3.1668805297498204),
|
||||
("minute", -3.0417173867958143)],
|
||||
n = 170}}),
|
||||
("integer (11..19)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<time-of-day> am|pm",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4700036292457356, unseen = -2.70805020110221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hh:mm (time-of-day)", -1.252762968495368),
|
||||
("<integer> (latent time-of-day)", -1.540445040947149),
|
||||
("hour", -1.540445040947149), ("minute", -1.252762968495368)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.9808292530117262,
|
||||
unseen = -2.3978952727983707,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.916290731874155),
|
||||
("hour", -0.916290731874155)],
|
||||
n = 3}}),
|
||||
("relative minutes after|past <integer> (hour-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (11..19)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (0..10)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5}}),
|
||||
("army's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect by \",\"",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.40546510810816444,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Sunday<named-month> <day-of-month>", -0.7576857016975165),
|
||||
("dayday", -0.7576857016975165)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -1.0986122886681098,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("daymonth", -0.8109302162163288),
|
||||
("SundayFebruary", -0.8109302162163288)],
|
||||
n = 7}}),
|
||||
("second (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> ago",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("last <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("March",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("the day after tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.5260563034950494, unseen = -2.890371757896165,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -1.041453874828161), ("Tuesday", -1.041453874828161)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.24512245803298496,
|
||||
unseen = -3.784189633918261,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9694406464655074),
|
||||
("<integer> (latent time-of-day)", -1.1962507582320256),
|
||||
("month (numeric with month symbol)", -3.068052935133617),
|
||||
("day", -1.9694406464655074), ("hour", -1.1962507582320256),
|
||||
("month", -3.068052935133617)],
|
||||
n = 18}}),
|
||||
("last <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8472978603872037,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.5596157879354228,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8362480242006186),
|
||||
("week (grain)", -0.8362480242006186)],
|
||||
n = 12}}),
|
||||
("christmas",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("new year's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.59511985013459,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.3877429013343523),
|
||||
("integer (0..10)month (grain)", -2.793208009442517),
|
||||
("integer (0..10)hour (grain)", -2.3877429013343523),
|
||||
("second", -2.793208009442517),
|
||||
("integer (0..10)day (grain)", -2.505525936990736),
|
||||
("integer (0..10)year (grain)", -3.1986731175506815),
|
||||
("integer (0..10)second (grain)", -2.793208009442517),
|
||||
("day", -2.505525936990736), ("year", -3.1986731175506815),
|
||||
("integer (0..10)minute (grain)", -2.639057329615259),
|
||||
("hour", -2.3877429013343523),
|
||||
("integer (0..10)week (grain)", -2.3877429013343523),
|
||||
("month", -2.793208009442517), ("minute", -2.639057329615259)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Tuesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.295836866004329,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 25},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("children's day",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("<named-month> <day-of-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.8283137373023015,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Marchinteger (0..10)", -3.028522096376982),
|
||||
("Februaryinteger (11..19)", -2.6230569882688175),
|
||||
("month (numeric with month symbol)integer (11..19)",
|
||||
-2.6230569882688175),
|
||||
("Marchinteger (numeric)", -3.721669276936927),
|
||||
("month (numeric with month symbol)integer (numeric)",
|
||||
-2.1122313645028266),
|
||||
("Februaryinteger (0..10)", -2.740840023925201),
|
||||
("month", -0.7427441216993174),
|
||||
("month (numeric with month symbol)integer (0..10)",
|
||||
-2.1122313645028266)],
|
||||
n = 58},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (0..10)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4540728071735412, unseen = -5.170483995038151,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 174},
|
||||
koData =
|
||||
ClassData{prior = -1.007957920399979, unseen = -4.624972813284271,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 100}}),
|
||||
("last n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.61512051684126,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.995732273553991),
|
||||
("integer (0..10)month (grain)", -2.120263536200091),
|
||||
("integer (0..10)hour (grain)", -2.4079456086518722),
|
||||
("second", -2.659260036932778),
|
||||
("integer (0..10)day (grain)", -2.995732273553991),
|
||||
("integer (0..10)year (grain)", -3.506557897319982),
|
||||
("integer (0..10)second (grain)", -2.659260036932778),
|
||||
("day", -2.995732273553991), ("year", -3.506557897319982),
|
||||
("integer (0..10)minute (grain)", -2.4079456086518722),
|
||||
("hour", -2.4079456086518722),
|
||||
("integer (0..10)week (grain)", -2.995732273553991),
|
||||
("month", -2.120263536200091), ("minute", -2.4079456086518722)],
|
||||
n = 43},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("ordinal (digits)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("n <cycle> last",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.007333185232471,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.379546134130174),
|
||||
("integer (0..10)month (grain)", -2.890371757896165),
|
||||
("integer (0..10)hour (grain)", -2.379546134130174),
|
||||
("second", -2.890371757896165),
|
||||
("integer (0..10)day (grain)", -2.379546134130174),
|
||||
("integer (0..10)year (grain)", -2.890371757896165),
|
||||
("integer (0..10)second (grain)", -2.890371757896165),
|
||||
("day", -2.379546134130174), ("year", -2.890371757896165),
|
||||
("integer (0..10)minute (grain)", -2.890371757896165),
|
||||
("hour", -2.379546134130174),
|
||||
("integer (0..10)week (grain)", -2.379546134130174),
|
||||
("month", -2.890371757896165), ("minute", -2.890371757896165)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("morning",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("week-end",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("day (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("labor day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("women's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.2076393647782445, unseen = -4.0943445622221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9980959022258835),
|
||||
("Monday", -1.9980959022258835), ("day", -0.8586616190375187),
|
||||
("hour", -2.9789251552376097), ("Tuesday", -1.6796421711073488),
|
||||
("week-end", -2.9789251552376097)],
|
||||
n = 26},
|
||||
koData =
|
||||
ClassData{prior = -1.6739764335716716, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.9985288301111273),
|
||||
("hour", -0.9985288301111273)],
|
||||
n = 6}})]
|
879
Duckling/Ranking/Classifiers/ZH_HK.hs
Normal file
879
Duckling/Ranking/Classifiers/ZH_HK.hs
Normal file
@ -0,0 +1,879 @@
|
||||
-- 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.ZH_HK (classifiers) where
|
||||
import Data.String
|
||||
import Prelude
|
||||
import qualified Data.HashMap.Strict as HashMap
|
||||
import Duckling.Ranking.Types
|
||||
|
||||
classifiers :: Classifiers
|
||||
classifiers
|
||||
= HashMap.fromList
|
||||
[("<time> timezone",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> am|pm", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Thursday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (numeric)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.5020919437972361, unseen = -3.871201010907891,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 46},
|
||||
koData =
|
||||
ClassData{prior = -0.9295359586241757,
|
||||
unseen = -3.4657359027997265,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 30}}),
|
||||
("the day before yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("today",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.6094379124341003,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -0.2231435513142097, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4}}),
|
||||
("absorption of , after named day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.833213344056216,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.6931471805599453), ("Sunday", -0.6931471805599453)],
|
||||
n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tonight",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("October",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("month (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.9808292530117262, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -0.4700036292457356,
|
||||
unseen = -3.7376696182833684,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 40}}),
|
||||
("<time-of-day> o'clock",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4418327522790392, unseen = -3.044522437723423,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -1.0296194171811581,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 5}}),
|
||||
("national day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3025850929940455,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.9444389791664407,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 17},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hour (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4367176516122688, unseen = -4.624972813284271,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -3.5165082281731497),
|
||||
("year (numeric with year symbol)<named-month> <day-of-month>",
|
||||
-1.5705980791178364),
|
||||
("dayday", -1.9070703157390494),
|
||||
("hourhour", -3.005682604407159),
|
||||
("hourminute", -3.5165082281731497),
|
||||
("absorption of , after named day<named-month> <day-of-month>",
|
||||
-1.9070703157390494),
|
||||
("dayminute", -3.5165082281731497),
|
||||
("tonight<time-of-day> o'clock", -3.005682604407159),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.5165082281731497),
|
||||
("yearday", -1.5705980791178364)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -1.0388930539664873,
|
||||
unseen = -4.1588830833596715,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -2.1972245773362196),
|
||||
("dayhour", -2.5336968139574325),
|
||||
("daymonth", -2.063693184711697),
|
||||
("year (numeric with year symbol)February", -3.044522437723423),
|
||||
("<dim time> <part-of-day><time-of-day> o'clock",
|
||||
-3.044522437723423),
|
||||
("hourhour", -3.044522437723423),
|
||||
("year (numeric with year symbol)March", -2.5336968139574325),
|
||||
("hourminute", -3.044522437723423),
|
||||
("yearmonth", -2.1972245773362196),
|
||||
("dayminute", -3.044522437723423),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.044522437723423),
|
||||
("absorption of , after named dayFebruary",
|
||||
-2.063693184711697)],
|
||||
n = 23}}),
|
||||
("year (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8209805520698302,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 11},
|
||||
koData =
|
||||
ClassData{prior = -0.579818495252942, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 14}}),
|
||||
("Saturday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("last tuesday, last july",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("next <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.7472144018302211,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.6418538861723948, unseen = -3.295836866004329,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8602012652231115),
|
||||
("week (grain)", -0.8602012652231115)],
|
||||
n = 10}}),
|
||||
("last year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.970291913552122,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.8718021769015913),
|
||||
("Monday", -1.8718021769015913), ("day", -0.7323678937132265),
|
||||
("Tuesday", -1.5533484457830569)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yyyy-mm-dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd/yyyy",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("evening|night",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Monday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hh:mm (time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<integer> (latent time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.3217558399823195,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.2809338454620642),
|
||||
("integer (0..10)", -0.325422400434628)],
|
||||
n = 16},
|
||||
koData =
|
||||
ClassData{prior = -0.3101549283038396,
|
||||
unseen = -3.8501476017100584,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -2.2192034840549946),
|
||||
("integer (0..10)", -0.11506932978478723)],
|
||||
n = 44}}),
|
||||
("nth <time> of <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Octoberordinal (digits)Monday", -1.3350010667323402),
|
||||
("monthday", -0.7472144018302211),
|
||||
("month (numeric with month symbol)ordinal (digits)Monday",
|
||||
-1.3350010667323402)],
|
||||
n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (numeric with month symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.13976194237515874,
|
||||
unseen = -3.7612001156935624,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.0296194171811581),
|
||||
("integer (0..10)", -0.4418327522790392)],
|
||||
n = 40},
|
||||
koData =
|
||||
ClassData{prior = -2.03688192726104, unseen = -2.1972245773362196,
|
||||
likelihoods =
|
||||
HashMap.fromList [("integer (0..10)", -0.13353139262452263)],
|
||||
n = 6}}),
|
||||
("week (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8434293836092833,
|
||||
unseen = -3.6635616461296463,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 37},
|
||||
koData =
|
||||
ClassData{prior = -0.5625269981428811,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 49}}),
|
||||
("valentine's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("year (numeric with year symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.4849066497880004,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("numbers prefix with -, negative or minus",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 4}}),
|
||||
("Friday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.1780538303479458,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.3437347467010947),
|
||||
("day", -0.7375989431307791), ("Tuesday", -1.3437347467010947)],
|
||||
n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Sunday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("afternoon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3978952727983707,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 9},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> from now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("February",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("this <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.0185695809945732,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.916290731874155),
|
||||
("year (grain)", -2.3025850929940455),
|
||||
("week (grain)", -0.916290731874155),
|
||||
("year", -2.3025850929940455)],
|
||||
n = 13},
|
||||
koData =
|
||||
ClassData{prior = -0.4480247225269604,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.7339691750802004),
|
||||
("week (grain)", -0.7339691750802004)],
|
||||
n = 23}}),
|
||||
("minute (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<dim time> <part-of-day>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.9889840465642745,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("dayhour", -0.7514160886839211),
|
||||
("national dayevening|night", -2.871679624884012),
|
||||
("<named-month> <day-of-month>morning", -1.405342556090585),
|
||||
("children's dayafternoon", -2.871679624884012),
|
||||
("Mondaymorning", -1.7730673362159024)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<part-of-day> <dim time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.587786664902119, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("tonight<integer> (latent time-of-day)", -2.2617630984737906),
|
||||
("hourhour", -1.1631508098056809),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-2.0794415416798357),
|
||||
("afternoon<time-of-day> o'clock", -2.4849066497880004),
|
||||
("hourminute", -1.9252908618525775),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-2.4849066497880004),
|
||||
("afternoonhh:mm (time-of-day)", -3.1780538303479458),
|
||||
("tonight<time-of-day> o'clock", -2.2617630984737906)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -0.8109302162163288, unseen = -3.713572066704308,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hourhour", -1.2039728043259361),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-1.8971199848858813),
|
||||
("afternoon<time-of-day> o'clock", -1.8971199848858813),
|
||||
("hourminute", -1.8971199848858813),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-1.742969305058623)],
|
||||
n = 16}}),
|
||||
("<integer> <unit-of-duration>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -5.877735781779639,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.6560549059838294),
|
||||
("integer (0..10)month (grain)", -2.068268241081711),
|
||||
("integer (0..10)hour (grain)", -2.8304082931286074),
|
||||
("second", -3.235873401236772),
|
||||
("integer (0..10)day (grain)", -3.0417173867958143),
|
||||
("integer (0..10)year (grain)", -3.572345637857985),
|
||||
("integer (numeric)year (grain)", -3.1668805297498204),
|
||||
("integer (0..10)second (grain)", -3.235873401236772),
|
||||
("day", -3.0417173867958143), ("year", -2.6968769005040847),
|
||||
("integer (0..10)minute (grain)", -3.0417173867958143),
|
||||
("hour", -2.8304082931286074),
|
||||
("integer (0..10)week (grain)", -2.6560549059838294),
|
||||
("month", -1.7973932869463112),
|
||||
("integer (numeric)month (grain)", -3.1668805297498204),
|
||||
("minute", -3.0417173867958143)],
|
||||
n = 170}}),
|
||||
("integer (11..19)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<time-of-day> am|pm",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4700036292457356, unseen = -2.70805020110221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hh:mm (time-of-day)", -1.252762968495368),
|
||||
("<integer> (latent time-of-day)", -1.540445040947149),
|
||||
("hour", -1.540445040947149), ("minute", -1.252762968495368)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.9808292530117262,
|
||||
unseen = -2.3978952727983707,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.916290731874155),
|
||||
("hour", -0.916290731874155)],
|
||||
n = 3}}),
|
||||
("relative minutes after|past <integer> (hour-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (11..19)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (0..10)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5}}),
|
||||
("army's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect by \",\"",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.40546510810816444,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Sunday<named-month> <day-of-month>", -0.7576857016975165),
|
||||
("dayday", -0.7576857016975165)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -1.0986122886681098,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("daymonth", -0.8109302162163288),
|
||||
("SundayFebruary", -0.8109302162163288)],
|
||||
n = 7}}),
|
||||
("second (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> ago",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("last <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("March",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("the day after tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.5260563034950494, unseen = -2.890371757896165,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -1.041453874828161), ("Tuesday", -1.041453874828161)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.24512245803298496,
|
||||
unseen = -3.784189633918261,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9694406464655074),
|
||||
("<integer> (latent time-of-day)", -1.1962507582320256),
|
||||
("month (numeric with month symbol)", -3.068052935133617),
|
||||
("day", -1.9694406464655074), ("hour", -1.1962507582320256),
|
||||
("month", -3.068052935133617)],
|
||||
n = 18}}),
|
||||
("last <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8472978603872037,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.5596157879354228,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8362480242006186),
|
||||
("week (grain)", -0.8362480242006186)],
|
||||
n = 12}}),
|
||||
("christmas",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("new year's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.59511985013459,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.3877429013343523),
|
||||
("integer (0..10)month (grain)", -2.793208009442517),
|
||||
("integer (0..10)hour (grain)", -2.3877429013343523),
|
||||
("second", -2.793208009442517),
|
||||
("integer (0..10)day (grain)", -2.505525936990736),
|
||||
("integer (0..10)year (grain)", -3.1986731175506815),
|
||||
("integer (0..10)second (grain)", -2.793208009442517),
|
||||
("day", -2.505525936990736), ("year", -3.1986731175506815),
|
||||
("integer (0..10)minute (grain)", -2.639057329615259),
|
||||
("hour", -2.3877429013343523),
|
||||
("integer (0..10)week (grain)", -2.3877429013343523),
|
||||
("month", -2.793208009442517), ("minute", -2.639057329615259)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Tuesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.295836866004329,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 25},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("children's day",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("<named-month> <day-of-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.8283137373023015,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Marchinteger (0..10)", -3.028522096376982),
|
||||
("Februaryinteger (11..19)", -2.6230569882688175),
|
||||
("month (numeric with month symbol)integer (11..19)",
|
||||
-2.6230569882688175),
|
||||
("Marchinteger (numeric)", -3.721669276936927),
|
||||
("month (numeric with month symbol)integer (numeric)",
|
||||
-2.1122313645028266),
|
||||
("Februaryinteger (0..10)", -2.740840023925201),
|
||||
("month", -0.7427441216993174),
|
||||
("month (numeric with month symbol)integer (0..10)",
|
||||
-2.1122313645028266)],
|
||||
n = 58},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (0..10)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4540728071735412, unseen = -5.170483995038151,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 174},
|
||||
koData =
|
||||
ClassData{prior = -1.007957920399979, unseen = -4.624972813284271,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 100}}),
|
||||
("last n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.61512051684126,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.995732273553991),
|
||||
("integer (0..10)month (grain)", -2.120263536200091),
|
||||
("integer (0..10)hour (grain)", -2.4079456086518722),
|
||||
("second", -2.659260036932778),
|
||||
("integer (0..10)day (grain)", -2.995732273553991),
|
||||
("integer (0..10)year (grain)", -3.506557897319982),
|
||||
("integer (0..10)second (grain)", -2.659260036932778),
|
||||
("day", -2.995732273553991), ("year", -3.506557897319982),
|
||||
("integer (0..10)minute (grain)", -2.4079456086518722),
|
||||
("hour", -2.4079456086518722),
|
||||
("integer (0..10)week (grain)", -2.995732273553991),
|
||||
("month", -2.120263536200091), ("minute", -2.4079456086518722)],
|
||||
n = 43},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("ordinal (digits)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("n <cycle> last",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.007333185232471,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.379546134130174),
|
||||
("integer (0..10)month (grain)", -2.890371757896165),
|
||||
("integer (0..10)hour (grain)", -2.379546134130174),
|
||||
("second", -2.890371757896165),
|
||||
("integer (0..10)day (grain)", -2.379546134130174),
|
||||
("integer (0..10)year (grain)", -2.890371757896165),
|
||||
("integer (0..10)second (grain)", -2.890371757896165),
|
||||
("day", -2.379546134130174), ("year", -2.890371757896165),
|
||||
("integer (0..10)minute (grain)", -2.890371757896165),
|
||||
("hour", -2.379546134130174),
|
||||
("integer (0..10)week (grain)", -2.379546134130174),
|
||||
("month", -2.890371757896165), ("minute", -2.890371757896165)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("morning",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("week-end",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("day (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("labor day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("women's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.2076393647782445, unseen = -4.0943445622221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9980959022258835),
|
||||
("Monday", -1.9980959022258835), ("day", -0.8586616190375187),
|
||||
("hour", -2.9789251552376097), ("Tuesday", -1.6796421711073488),
|
||||
("week-end", -2.9789251552376097)],
|
||||
n = 26},
|
||||
koData =
|
||||
ClassData{prior = -1.6739764335716716, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.9985288301111273),
|
||||
("hour", -0.9985288301111273)],
|
||||
n = 6}})]
|
879
Duckling/Ranking/Classifiers/ZH_MO.hs
Normal file
879
Duckling/Ranking/Classifiers/ZH_MO.hs
Normal file
@ -0,0 +1,879 @@
|
||||
-- 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.ZH_MO (classifiers) where
|
||||
import Data.String
|
||||
import Prelude
|
||||
import qualified Data.HashMap.Strict as HashMap
|
||||
import Duckling.Ranking.Types
|
||||
|
||||
classifiers :: Classifiers
|
||||
classifiers
|
||||
= HashMap.fromList
|
||||
[("<time> timezone",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> am|pm", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Thursday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (numeric)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.5020919437972361, unseen = -3.871201010907891,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 46},
|
||||
koData =
|
||||
ClassData{prior = -0.9295359586241757,
|
||||
unseen = -3.4657359027997265,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 30}}),
|
||||
("the day before yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("today",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.6094379124341003,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -0.2231435513142097, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4}}),
|
||||
("absorption of , after named day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.833213344056216,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.6931471805599453), ("Sunday", -0.6931471805599453)],
|
||||
n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tonight",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("October",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("month (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.9808292530117262, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -0.4700036292457356,
|
||||
unseen = -3.7376696182833684,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 40}}),
|
||||
("<time-of-day> o'clock",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4418327522790392, unseen = -3.044522437723423,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -1.0296194171811581,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 5}}),
|
||||
("national day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3025850929940455,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.9444389791664407,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 17},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hour (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4367176516122688, unseen = -4.624972813284271,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -3.5165082281731497),
|
||||
("year (numeric with year symbol)<named-month> <day-of-month>",
|
||||
-1.5705980791178364),
|
||||
("dayday", -1.9070703157390494),
|
||||
("hourhour", -3.005682604407159),
|
||||
("hourminute", -3.5165082281731497),
|
||||
("absorption of , after named day<named-month> <day-of-month>",
|
||||
-1.9070703157390494),
|
||||
("dayminute", -3.5165082281731497),
|
||||
("tonight<time-of-day> o'clock", -3.005682604407159),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.5165082281731497),
|
||||
("yearday", -1.5705980791178364)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -1.0388930539664873,
|
||||
unseen = -4.1588830833596715,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -2.1972245773362196),
|
||||
("dayhour", -2.5336968139574325),
|
||||
("daymonth", -2.063693184711697),
|
||||
("year (numeric with year symbol)February", -3.044522437723423),
|
||||
("<dim time> <part-of-day><time-of-day> o'clock",
|
||||
-3.044522437723423),
|
||||
("hourhour", -3.044522437723423),
|
||||
("year (numeric with year symbol)March", -2.5336968139574325),
|
||||
("hourminute", -3.044522437723423),
|
||||
("yearmonth", -2.1972245773362196),
|
||||
("dayminute", -3.044522437723423),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.044522437723423),
|
||||
("absorption of , after named dayFebruary",
|
||||
-2.063693184711697)],
|
||||
n = 23}}),
|
||||
("year (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8209805520698302,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 11},
|
||||
koData =
|
||||
ClassData{prior = -0.579818495252942, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 14}}),
|
||||
("Saturday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("last tuesday, last july",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("next <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.7472144018302211,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.6418538861723948, unseen = -3.295836866004329,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8602012652231115),
|
||||
("week (grain)", -0.8602012652231115)],
|
||||
n = 10}}),
|
||||
("last year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.970291913552122,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.8718021769015913),
|
||||
("Monday", -1.8718021769015913), ("day", -0.7323678937132265),
|
||||
("Tuesday", -1.5533484457830569)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yyyy-mm-dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd/yyyy",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("evening|night",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Monday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hh:mm (time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<integer> (latent time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.3217558399823195,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.2809338454620642),
|
||||
("integer (0..10)", -0.325422400434628)],
|
||||
n = 16},
|
||||
koData =
|
||||
ClassData{prior = -0.3101549283038396,
|
||||
unseen = -3.8501476017100584,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -2.2192034840549946),
|
||||
("integer (0..10)", -0.11506932978478723)],
|
||||
n = 44}}),
|
||||
("nth <time> of <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Octoberordinal (digits)Monday", -1.3350010667323402),
|
||||
("monthday", -0.7472144018302211),
|
||||
("month (numeric with month symbol)ordinal (digits)Monday",
|
||||
-1.3350010667323402)],
|
||||
n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (numeric with month symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.13976194237515874,
|
||||
unseen = -3.7612001156935624,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.0296194171811581),
|
||||
("integer (0..10)", -0.4418327522790392)],
|
||||
n = 40},
|
||||
koData =
|
||||
ClassData{prior = -2.03688192726104, unseen = -2.1972245773362196,
|
||||
likelihoods =
|
||||
HashMap.fromList [("integer (0..10)", -0.13353139262452263)],
|
||||
n = 6}}),
|
||||
("week (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8434293836092833,
|
||||
unseen = -3.6635616461296463,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 37},
|
||||
koData =
|
||||
ClassData{prior = -0.5625269981428811,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 49}}),
|
||||
("valentine's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("year (numeric with year symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.4849066497880004,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("numbers prefix with -, negative or minus",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 4}}),
|
||||
("Friday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.1780538303479458,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.3437347467010947),
|
||||
("day", -0.7375989431307791), ("Tuesday", -1.3437347467010947)],
|
||||
n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Sunday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("afternoon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3978952727983707,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 9},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> from now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("February",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("this <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.0185695809945732,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.916290731874155),
|
||||
("year (grain)", -2.3025850929940455),
|
||||
("week (grain)", -0.916290731874155),
|
||||
("year", -2.3025850929940455)],
|
||||
n = 13},
|
||||
koData =
|
||||
ClassData{prior = -0.4480247225269604,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.7339691750802004),
|
||||
("week (grain)", -0.7339691750802004)],
|
||||
n = 23}}),
|
||||
("minute (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<dim time> <part-of-day>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.9889840465642745,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("dayhour", -0.7514160886839211),
|
||||
("national dayevening|night", -2.871679624884012),
|
||||
("<named-month> <day-of-month>morning", -1.405342556090585),
|
||||
("children's dayafternoon", -2.871679624884012),
|
||||
("Mondaymorning", -1.7730673362159024)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<part-of-day> <dim time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.587786664902119, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("tonight<integer> (latent time-of-day)", -2.2617630984737906),
|
||||
("hourhour", -1.1631508098056809),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-2.0794415416798357),
|
||||
("afternoon<time-of-day> o'clock", -2.4849066497880004),
|
||||
("hourminute", -1.9252908618525775),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-2.4849066497880004),
|
||||
("afternoonhh:mm (time-of-day)", -3.1780538303479458),
|
||||
("tonight<time-of-day> o'clock", -2.2617630984737906)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -0.8109302162163288, unseen = -3.713572066704308,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hourhour", -1.2039728043259361),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-1.8971199848858813),
|
||||
("afternoon<time-of-day> o'clock", -1.8971199848858813),
|
||||
("hourminute", -1.8971199848858813),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-1.742969305058623)],
|
||||
n = 16}}),
|
||||
("<integer> <unit-of-duration>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -5.877735781779639,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.6560549059838294),
|
||||
("integer (0..10)month (grain)", -2.068268241081711),
|
||||
("integer (0..10)hour (grain)", -2.8304082931286074),
|
||||
("second", -3.235873401236772),
|
||||
("integer (0..10)day (grain)", -3.0417173867958143),
|
||||
("integer (0..10)year (grain)", -3.572345637857985),
|
||||
("integer (numeric)year (grain)", -3.1668805297498204),
|
||||
("integer (0..10)second (grain)", -3.235873401236772),
|
||||
("day", -3.0417173867958143), ("year", -2.6968769005040847),
|
||||
("integer (0..10)minute (grain)", -3.0417173867958143),
|
||||
("hour", -2.8304082931286074),
|
||||
("integer (0..10)week (grain)", -2.6560549059838294),
|
||||
("month", -1.7973932869463112),
|
||||
("integer (numeric)month (grain)", -3.1668805297498204),
|
||||
("minute", -3.0417173867958143)],
|
||||
n = 170}}),
|
||||
("integer (11..19)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<time-of-day> am|pm",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4700036292457356, unseen = -2.70805020110221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hh:mm (time-of-day)", -1.252762968495368),
|
||||
("<integer> (latent time-of-day)", -1.540445040947149),
|
||||
("hour", -1.540445040947149), ("minute", -1.252762968495368)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.9808292530117262,
|
||||
unseen = -2.3978952727983707,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.916290731874155),
|
||||
("hour", -0.916290731874155)],
|
||||
n = 3}}),
|
||||
("relative minutes after|past <integer> (hour-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (11..19)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (0..10)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5}}),
|
||||
("army's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect by \",\"",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.40546510810816444,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Sunday<named-month> <day-of-month>", -0.7576857016975165),
|
||||
("dayday", -0.7576857016975165)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -1.0986122886681098,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("daymonth", -0.8109302162163288),
|
||||
("SundayFebruary", -0.8109302162163288)],
|
||||
n = 7}}),
|
||||
("second (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> ago",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("last <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("March",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("the day after tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.5260563034950494, unseen = -2.890371757896165,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -1.041453874828161), ("Tuesday", -1.041453874828161)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.24512245803298496,
|
||||
unseen = -3.784189633918261,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9694406464655074),
|
||||
("<integer> (latent time-of-day)", -1.1962507582320256),
|
||||
("month (numeric with month symbol)", -3.068052935133617),
|
||||
("day", -1.9694406464655074), ("hour", -1.1962507582320256),
|
||||
("month", -3.068052935133617)],
|
||||
n = 18}}),
|
||||
("last <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8472978603872037,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.5596157879354228,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8362480242006186),
|
||||
("week (grain)", -0.8362480242006186)],
|
||||
n = 12}}),
|
||||
("christmas",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("new year's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.59511985013459,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.3877429013343523),
|
||||
("integer (0..10)month (grain)", -2.793208009442517),
|
||||
("integer (0..10)hour (grain)", -2.3877429013343523),
|
||||
("second", -2.793208009442517),
|
||||
("integer (0..10)day (grain)", -2.505525936990736),
|
||||
("integer (0..10)year (grain)", -3.1986731175506815),
|
||||
("integer (0..10)second (grain)", -2.793208009442517),
|
||||
("day", -2.505525936990736), ("year", -3.1986731175506815),
|
||||
("integer (0..10)minute (grain)", -2.639057329615259),
|
||||
("hour", -2.3877429013343523),
|
||||
("integer (0..10)week (grain)", -2.3877429013343523),
|
||||
("month", -2.793208009442517), ("minute", -2.639057329615259)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Tuesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.295836866004329,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 25},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("children's day",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("<named-month> <day-of-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.8283137373023015,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Marchinteger (0..10)", -3.028522096376982),
|
||||
("Februaryinteger (11..19)", -2.6230569882688175),
|
||||
("month (numeric with month symbol)integer (11..19)",
|
||||
-2.6230569882688175),
|
||||
("Marchinteger (numeric)", -3.721669276936927),
|
||||
("month (numeric with month symbol)integer (numeric)",
|
||||
-2.1122313645028266),
|
||||
("Februaryinteger (0..10)", -2.740840023925201),
|
||||
("month", -0.7427441216993174),
|
||||
("month (numeric with month symbol)integer (0..10)",
|
||||
-2.1122313645028266)],
|
||||
n = 58},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (0..10)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4540728071735412, unseen = -5.170483995038151,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 174},
|
||||
koData =
|
||||
ClassData{prior = -1.007957920399979, unseen = -4.624972813284271,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 100}}),
|
||||
("last n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.61512051684126,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.995732273553991),
|
||||
("integer (0..10)month (grain)", -2.120263536200091),
|
||||
("integer (0..10)hour (grain)", -2.4079456086518722),
|
||||
("second", -2.659260036932778),
|
||||
("integer (0..10)day (grain)", -2.995732273553991),
|
||||
("integer (0..10)year (grain)", -3.506557897319982),
|
||||
("integer (0..10)second (grain)", -2.659260036932778),
|
||||
("day", -2.995732273553991), ("year", -3.506557897319982),
|
||||
("integer (0..10)minute (grain)", -2.4079456086518722),
|
||||
("hour", -2.4079456086518722),
|
||||
("integer (0..10)week (grain)", -2.995732273553991),
|
||||
("month", -2.120263536200091), ("minute", -2.4079456086518722)],
|
||||
n = 43},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("ordinal (digits)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("n <cycle> last",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.007333185232471,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.379546134130174),
|
||||
("integer (0..10)month (grain)", -2.890371757896165),
|
||||
("integer (0..10)hour (grain)", -2.379546134130174),
|
||||
("second", -2.890371757896165),
|
||||
("integer (0..10)day (grain)", -2.379546134130174),
|
||||
("integer (0..10)year (grain)", -2.890371757896165),
|
||||
("integer (0..10)second (grain)", -2.890371757896165),
|
||||
("day", -2.379546134130174), ("year", -2.890371757896165),
|
||||
("integer (0..10)minute (grain)", -2.890371757896165),
|
||||
("hour", -2.379546134130174),
|
||||
("integer (0..10)week (grain)", -2.379546134130174),
|
||||
("month", -2.890371757896165), ("minute", -2.890371757896165)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("morning",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("week-end",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("day (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("labor day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("women's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.2076393647782445, unseen = -4.0943445622221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9980959022258835),
|
||||
("Monday", -1.9980959022258835), ("day", -0.8586616190375187),
|
||||
("hour", -2.9789251552376097), ("Tuesday", -1.6796421711073488),
|
||||
("week-end", -2.9789251552376097)],
|
||||
n = 26},
|
||||
koData =
|
||||
ClassData{prior = -1.6739764335716716, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.9985288301111273),
|
||||
("hour", -0.9985288301111273)],
|
||||
n = 6}})]
|
879
Duckling/Ranking/Classifiers/ZH_TW.hs
Normal file
879
Duckling/Ranking/Classifiers/ZH_TW.hs
Normal file
@ -0,0 +1,879 @@
|
||||
-- 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.ZH_TW (classifiers) where
|
||||
import Data.String
|
||||
import Prelude
|
||||
import qualified Data.HashMap.Strict as HashMap
|
||||
import Duckling.Ranking.Types
|
||||
|
||||
classifiers :: Classifiers
|
||||
classifiers
|
||||
= HashMap.fromList
|
||||
[("<time> timezone",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> am|pm", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Thursday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (numeric)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.5020919437972361, unseen = -3.871201010907891,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 46},
|
||||
koData =
|
||||
ClassData{prior = -0.9295359586241757,
|
||||
unseen = -3.4657359027997265,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 30}}),
|
||||
("the day before yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("today",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.6094379124341003,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -0.2231435513142097, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4}}),
|
||||
("absorption of , after named day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.833213344056216,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.6931471805599453), ("Sunday", -0.6931471805599453)],
|
||||
n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tonight",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("October",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("month (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.9808292530117262, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -0.4700036292457356,
|
||||
unseen = -3.7376696182833684,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 40}}),
|
||||
("<time-of-day> o'clock",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4418327522790392, unseen = -3.044522437723423,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -1.0296194171811581,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 5}}),
|
||||
("national day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3025850929940455,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.9444389791664407,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 17},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hour (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4367176516122688, unseen = -4.624972813284271,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -3.5165082281731497),
|
||||
("year (numeric with year symbol)<named-month> <day-of-month>",
|
||||
-1.5705980791178364),
|
||||
("dayday", -1.9070703157390494),
|
||||
("hourhour", -3.005682604407159),
|
||||
("hourminute", -3.5165082281731497),
|
||||
("absorption of , after named day<named-month> <day-of-month>",
|
||||
-1.9070703157390494),
|
||||
("dayminute", -3.5165082281731497),
|
||||
("tonight<time-of-day> o'clock", -3.005682604407159),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.5165082281731497),
|
||||
("yearday", -1.5705980791178364)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -1.0388930539664873,
|
||||
unseen = -4.1588830833596715,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("children's day<part-of-day> <dim time>", -2.1972245773362196),
|
||||
("dayhour", -2.5336968139574325),
|
||||
("daymonth", -2.063693184711697),
|
||||
("year (numeric with year symbol)February", -3.044522437723423),
|
||||
("<dim time> <part-of-day><time-of-day> o'clock",
|
||||
-3.044522437723423),
|
||||
("hourhour", -3.044522437723423),
|
||||
("year (numeric with year symbol)March", -2.5336968139574325),
|
||||
("hourminute", -3.044522437723423),
|
||||
("yearmonth", -2.1972245773362196),
|
||||
("dayminute", -3.044522437723423),
|
||||
("<dim time> <part-of-day>relative minutes after|past <integer> (hour-of-day)",
|
||||
-3.044522437723423),
|
||||
("absorption of , after named dayFebruary",
|
||||
-2.063693184711697)],
|
||||
n = 23}}),
|
||||
("year (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8209805520698302,
|
||||
unseen = -2.5649493574615367,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 11},
|
||||
koData =
|
||||
ClassData{prior = -0.579818495252942, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 14}}),
|
||||
("Saturday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("last tuesday, last july",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("next <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.7472144018302211,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.6418538861723948, unseen = -3.295836866004329,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8602012652231115),
|
||||
("week (grain)", -0.8602012652231115)],
|
||||
n = 10}}),
|
||||
("last year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.970291913552122,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.8718021769015913),
|
||||
("Monday", -1.8718021769015913), ("day", -0.7323678937132265),
|
||||
("Tuesday", -1.5533484457830569)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yyyy-mm-dd",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("mm/dd/yyyy",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("evening|night",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Monday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.258096538021482,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("yesterday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("hh:mm (time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<integer> (latent time-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.3217558399823195,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.2809338454620642),
|
||||
("integer (0..10)", -0.325422400434628)],
|
||||
n = 16},
|
||||
koData =
|
||||
ClassData{prior = -0.3101549283038396,
|
||||
unseen = -3.8501476017100584,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -2.2192034840549946),
|
||||
("integer (0..10)", -0.11506932978478723)],
|
||||
n = 44}}),
|
||||
("nth <time> of <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Octoberordinal (digits)Monday", -1.3350010667323402),
|
||||
("monthday", -0.7472144018302211),
|
||||
("month (numeric with month symbol)ordinal (digits)Monday",
|
||||
-1.3350010667323402)],
|
||||
n = 8},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (numeric with month symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.13976194237515874,
|
||||
unseen = -3.7612001156935624,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -1.0296194171811581),
|
||||
("integer (0..10)", -0.4418327522790392)],
|
||||
n = 40},
|
||||
koData =
|
||||
ClassData{prior = -2.03688192726104, unseen = -2.1972245773362196,
|
||||
likelihoods =
|
||||
HashMap.fromList [("integer (0..10)", -0.13353139262452263)],
|
||||
n = 6}}),
|
||||
("week (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8434293836092833,
|
||||
unseen = -3.6635616461296463,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 37},
|
||||
koData =
|
||||
ClassData{prior = -0.5625269981428811,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 49}}),
|
||||
("valentine's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("year (numeric with year symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.772588722239781,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.4849066497880004,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("numbers prefix with -, negative or minus",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (numeric)", 0.0)],
|
||||
n = 4}}),
|
||||
("Friday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.9459101490553135,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this year",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <day-of-week>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.1780538303479458,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.3437347467010947),
|
||||
("day", -0.7375989431307791), ("Tuesday", -1.3437347467010947)],
|
||||
n = 10},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Sunday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("afternoon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.3978952727983707,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 9},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> from now",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("February",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("this <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.0185695809945732,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.916290731874155),
|
||||
("year (grain)", -2.3025850929940455),
|
||||
("week (grain)", -0.916290731874155),
|
||||
("year", -2.3025850929940455)],
|
||||
n = 13},
|
||||
koData =
|
||||
ClassData{prior = -0.4480247225269604,
|
||||
unseen = -3.9318256327243257,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.7339691750802004),
|
||||
("week (grain)", -0.7339691750802004)],
|
||||
n = 23}}),
|
||||
("minute (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<dim time> <part-of-day>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.9889840465642745,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("dayhour", -0.7514160886839211),
|
||||
("national dayevening|night", -2.871679624884012),
|
||||
("<named-month> <day-of-month>morning", -1.405342556090585),
|
||||
("children's dayafternoon", -2.871679624884012),
|
||||
("Mondaymorning", -1.7730673362159024)],
|
||||
n = 24},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<part-of-day> <dim time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.587786664902119, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("tonight<integer> (latent time-of-day)", -2.2617630984737906),
|
||||
("hourhour", -1.1631508098056809),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-2.0794415416798357),
|
||||
("afternoon<time-of-day> o'clock", -2.4849066497880004),
|
||||
("hourminute", -1.9252908618525775),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-2.4849066497880004),
|
||||
("afternoonhh:mm (time-of-day)", -3.1780538303479458),
|
||||
("tonight<time-of-day> o'clock", -2.2617630984737906)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -0.8109302162163288, unseen = -3.713572066704308,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hourhour", -1.2039728043259361),
|
||||
("afternoonrelative minutes after|past <integer> (hour-of-day)",
|
||||
-1.8971199848858813),
|
||||
("afternoon<time-of-day> o'clock", -1.8971199848858813),
|
||||
("hourminute", -1.8971199848858813),
|
||||
("afternoon<integer> (latent time-of-day)",
|
||||
-1.742969305058623)],
|
||||
n = 16}}),
|
||||
("<integer> <unit-of-duration>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -5.877735781779639,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.6560549059838294),
|
||||
("integer (0..10)month (grain)", -2.068268241081711),
|
||||
("integer (0..10)hour (grain)", -2.8304082931286074),
|
||||
("second", -3.235873401236772),
|
||||
("integer (0..10)day (grain)", -3.0417173867958143),
|
||||
("integer (0..10)year (grain)", -3.572345637857985),
|
||||
("integer (numeric)year (grain)", -3.1668805297498204),
|
||||
("integer (0..10)second (grain)", -3.235873401236772),
|
||||
("day", -3.0417173867958143), ("year", -2.6968769005040847),
|
||||
("integer (0..10)minute (grain)", -3.0417173867958143),
|
||||
("hour", -2.8304082931286074),
|
||||
("integer (0..10)week (grain)", -2.6560549059838294),
|
||||
("month", -1.7973932869463112),
|
||||
("integer (numeric)month (grain)", -3.1668805297498204),
|
||||
("minute", -3.0417173867958143)],
|
||||
n = 170}}),
|
||||
("integer (11..19)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<time-of-day> am|pm",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4700036292457356, unseen = -2.70805020110221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hh:mm (time-of-day)", -1.252762968495368),
|
||||
("<integer> (latent time-of-day)", -1.540445040947149),
|
||||
("hour", -1.540445040947149), ("minute", -1.252762968495368)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.9808292530117262,
|
||||
unseen = -2.3978952727983707,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.916290731874155),
|
||||
("hour", -0.916290731874155)],
|
||||
n = 3}}),
|
||||
("relative minutes after|past <integer> (hour-of-day)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (11..19)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453, unseen = -2.639057329615259,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)integer (0..10)",
|
||||
-0.7731898882334817),
|
||||
("hour", -0.7731898882334817)],
|
||||
n = 5}}),
|
||||
("army's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("intersect by \",\"",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.40546510810816444,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Sunday<named-month> <day-of-month>", -0.7576857016975165),
|
||||
("dayday", -0.7576857016975165)],
|
||||
n = 14},
|
||||
koData =
|
||||
ClassData{prior = -1.0986122886681098,
|
||||
unseen = -2.9444389791664407,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("daymonth", -0.8109302162163288),
|
||||
("SundayFebruary", -0.8109302162163288)],
|
||||
n = 7}}),
|
||||
("second (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 13},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<duration> ago",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.2617630984737906), ("second", -2.772588722239781),
|
||||
("day", -2.2617630984737906), ("year", -2.772588722239781),
|
||||
("<integer> <unit-of-duration>", -0.8266785731844679),
|
||||
("hour", -2.2617630984737906), ("month", -2.772588722239781),
|
||||
("minute", -2.772588722239781)],
|
||||
n = 20}}),
|
||||
("last <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.2039728043259361,
|
||||
unseen = -3.4965075614664802,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -0.9007865453381898), ("Sunday", -1.3862943611198906),
|
||||
("Tuesday", -1.6739764335716716)],
|
||||
n = 12},
|
||||
koData =
|
||||
ClassData{prior = -0.35667494393873245,
|
||||
unseen = -4.174387269895637,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -1.0233888674305223),
|
||||
("month (numeric with month symbol)", -2.367123614131617),
|
||||
("February", -3.4657359027997265),
|
||||
("hour", -1.0233888674305223), ("month", -2.2129729343043585)],
|
||||
n = 28}}),
|
||||
("March",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 7},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("the day after tomorrow",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.5260563034950494, unseen = -2.890371757896165,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("day", -1.041453874828161), ("Tuesday", -1.041453874828161)],
|
||||
n = 5},
|
||||
koData =
|
||||
ClassData{prior = -0.24512245803298496,
|
||||
unseen = -3.784189633918261,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9694406464655074),
|
||||
("<integer> (latent time-of-day)", -1.1962507582320256),
|
||||
("month (numeric with month symbol)", -3.068052935133617),
|
||||
("day", -1.9694406464655074), ("hour", -1.1962507582320256),
|
||||
("month", -3.068052935133617)],
|
||||
n = 18}}),
|
||||
("last <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.8472978603872037,
|
||||
unseen = -3.2188758248682006,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -1.3862943611198906),
|
||||
("month (grain)", -1.791759469228055),
|
||||
("year (grain)", -2.4849066497880004),
|
||||
("week (grain)", -1.3862943611198906),
|
||||
("year", -2.4849066497880004), ("month", -1.791759469228055)],
|
||||
n = 9},
|
||||
koData =
|
||||
ClassData{prior = -0.5596157879354228,
|
||||
unseen = -3.4339872044851463,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -0.8362480242006186),
|
||||
("week (grain)", -0.8362480242006186)],
|
||||
n = 12}}),
|
||||
("christmas",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("new year's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("next n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.59511985013459,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.3877429013343523),
|
||||
("integer (0..10)month (grain)", -2.793208009442517),
|
||||
("integer (0..10)hour (grain)", -2.3877429013343523),
|
||||
("second", -2.793208009442517),
|
||||
("integer (0..10)day (grain)", -2.505525936990736),
|
||||
("integer (0..10)year (grain)", -3.1986731175506815),
|
||||
("integer (0..10)second (grain)", -2.793208009442517),
|
||||
("day", -2.505525936990736), ("year", -3.1986731175506815),
|
||||
("integer (0..10)minute (grain)", -2.639057329615259),
|
||||
("hour", -2.3877429013343523),
|
||||
("integer (0..10)week (grain)", -2.3877429013343523),
|
||||
("month", -2.793208009442517), ("minute", -2.639057329615259)],
|
||||
n = 42},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Tuesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.295836866004329,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 25},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("children's day",
|
||||
Classifier{okData =
|
||||
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}}),
|
||||
("<named-month> <day-of-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.8283137373023015,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Marchinteger (0..10)", -3.028522096376982),
|
||||
("Februaryinteger (11..19)", -2.6230569882688175),
|
||||
("month (numeric with month symbol)integer (11..19)",
|
||||
-2.6230569882688175),
|
||||
("Marchinteger (numeric)", -3.721669276936927),
|
||||
("month (numeric with month symbol)integer (numeric)",
|
||||
-2.1122313645028266),
|
||||
("Februaryinteger (0..10)", -2.740840023925201),
|
||||
("month", -0.7427441216993174),
|
||||
("month (numeric with month symbol)integer (0..10)",
|
||||
-2.1122313645028266)],
|
||||
n = 58},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.1972245773362196,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (0..10)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.4540728071735412, unseen = -5.170483995038151,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 174},
|
||||
koData =
|
||||
ClassData{prior = -1.007957920399979, unseen = -4.624972813284271,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 100}}),
|
||||
("last n <cycle>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.61512051684126,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.995732273553991),
|
||||
("integer (0..10)month (grain)", -2.120263536200091),
|
||||
("integer (0..10)hour (grain)", -2.4079456086518722),
|
||||
("second", -2.659260036932778),
|
||||
("integer (0..10)day (grain)", -2.995732273553991),
|
||||
("integer (0..10)year (grain)", -3.506557897319982),
|
||||
("integer (0..10)second (grain)", -2.659260036932778),
|
||||
("day", -2.995732273553991), ("year", -3.506557897319982),
|
||||
("integer (0..10)minute (grain)", -2.4079456086518722),
|
||||
("hour", -2.4079456086518722),
|
||||
("integer (0..10)week (grain)", -2.995732273553991),
|
||||
("month", -2.120263536200091), ("minute", -2.4079456086518722)],
|
||||
n = 43},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("ordinal (digits)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("integer (0..10)", 0.0)], n = 4},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("n <cycle> last",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -4.007333185232471,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -2.379546134130174),
|
||||
("integer (0..10)month (grain)", -2.890371757896165),
|
||||
("integer (0..10)hour (grain)", -2.379546134130174),
|
||||
("second", -2.890371757896165),
|
||||
("integer (0..10)day (grain)", -2.379546134130174),
|
||||
("integer (0..10)year (grain)", -2.890371757896165),
|
||||
("integer (0..10)second (grain)", -2.890371757896165),
|
||||
("day", -2.379546134130174), ("year", -2.890371757896165),
|
||||
("integer (0..10)minute (grain)", -2.890371757896165),
|
||||
("hour", -2.379546134130174),
|
||||
("integer (0..10)week (grain)", -2.379546134130174),
|
||||
("month", -2.890371757896165), ("minute", -2.890371757896165)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -2.70805020110221,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("morning",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.890371757896165,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 16},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("week-end",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("day (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -6.453852113757118e-2,
|
||||
unseen = -2.833213344056216,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 15},
|
||||
koData =
|
||||
ClassData{prior = -2.772588722239781, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("labor day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("women's day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("this <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.2076393647782445, unseen = -4.0943445622221,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("Wednesday", -1.9980959022258835),
|
||||
("Monday", -1.9980959022258835), ("day", -0.8586616190375187),
|
||||
("hour", -2.9789251552376097), ("Tuesday", -1.6796421711073488),
|
||||
("week-end", -2.9789251552376097)],
|
||||
n = 26},
|
||||
koData =
|
||||
ClassData{prior = -1.6739764335716716, unseen = -2.995732273553991,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<integer> (latent time-of-day)", -0.9985288301111273),
|
||||
("hour", -0.9985288301111273)],
|
||||
n = 6}})]
|
@ -117,13 +117,6 @@ classifiers
|
||||
[("<integer> (latent time-of-day)", -0.6931471805599453),
|
||||
("hour", -0.6931471805599453)],
|
||||
n = 5}}),
|
||||
("national day",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.0794415416798357,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 6},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -2.9444389791664407,
|
||||
@ -264,13 +257,6 @@ classifiers
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("evening|night",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("Monday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.258096538021482,
|
||||
@ -478,17 +464,16 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<dim time> <part-of-day>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.9889840465642745,
|
||||
ClassData{prior = 0.0, unseen = -3.891820298110627,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("dayhour", -0.7514160886839211),
|
||||
("national dayevening|night", -2.871679624884012),
|
||||
("<named-month> <day-of-month>morning", -1.405342556090585),
|
||||
("children's dayafternoon", -2.871679624884012),
|
||||
("Mondaymorning", -1.7730673362159024)],
|
||||
n = 24},
|
||||
[("dayhour", -0.7357067949787413),
|
||||
("<named-month> <day-of-month>morning", -1.3062516534463542),
|
||||
("children's dayafternoon", -2.772588722239781),
|
||||
("Mondaymorning", -1.6739764335716716)],
|
||||
n = 22},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.791759469228055,
|
||||
ClassData{prior = -infinity, unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<part-of-day> <dim time>",
|
||||
Classifier{okData =
|
||||
|
@ -44,7 +44,7 @@ defaultRules dim = langRules dim
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules GB (This Time) = TimeGB.rules
|
||||
localeRules US (This Time) = TimeUS.rules
|
||||
localeRules _ _ = []
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
|
@ -22,13 +22,21 @@ import qualified Duckling.Numeral.ZH.Rules as Numeral
|
||||
import qualified Duckling.Ordinal.ZH.Rules as Ordinal
|
||||
import qualified Duckling.Temperature.ZH.Rules as Temperature
|
||||
import qualified Duckling.Time.ZH.Rules as Time
|
||||
import qualified Duckling.Time.ZH.CN.Rules as TimeCN
|
||||
import qualified Duckling.Time.ZH.HK.Rules as TimeHK
|
||||
import qualified Duckling.Time.ZH.MO.Rules as TimeMO
|
||||
import qualified Duckling.Time.ZH.TW.Rules as TimeTW
|
||||
import qualified Duckling.TimeGrain.ZH.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules _ _ = []
|
||||
localeRules CN (This Time) = TimeCN.rules
|
||||
localeRules HK (This Time) = TimeHK.rules
|
||||
localeRules MO (This Time) = TimeMO.rules
|
||||
localeRules TW (This Time) = TimeTW.rules
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
|
37
Duckling/Time/ZH/CN/Corpus.hs
Normal file
37
Duckling/Time/ZH/CN/Corpus.hs
Normal file
@ -0,0 +1,37 @@
|
||||
-- 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.ZH.CN.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 hiding (add)
|
||||
|
||||
allExamples :: [Example]
|
||||
allExamples = concat
|
||||
[ examples (datetime (2013, 10, 1, 0, 0, 0) Day)
|
||||
[ "国庆"
|
||||
, "國慶"
|
||||
, "国庆节"
|
||||
, "国庆節"
|
||||
, "國慶节"
|
||||
, "國慶節"
|
||||
]
|
||||
, examples (datetimeInterval ((2013, 10, 1, 18, 0, 0), (2013, 10, 2, 0, 0, 0)) Hour)
|
||||
[ "国庆节晚上"
|
||||
, "國慶節晚上"
|
||||
]
|
||||
]
|
35
Duckling/Time/ZH/CN/Rules.hs
Normal file
35
Duckling/Time/ZH/CN/Rules.hs
Normal file
@ -0,0 +1,35 @@
|
||||
-- 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.ZH.CN.Rules
|
||||
( rules
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Duckling.Regex.Types
|
||||
import Duckling.Time.Helpers
|
||||
import Duckling.Types
|
||||
|
||||
ruleNationalDay :: Rule
|
||||
ruleNationalDay = Rule
|
||||
{ name = "national day"
|
||||
, pattern =
|
||||
[ regex "(国庆|國慶)(节|節)?"
|
||||
]
|
||||
, prod = \_ -> tt $ monthDay 10 1
|
||||
}
|
||||
|
||||
rules :: [Rule]
|
||||
rules =
|
||||
[ ruleNationalDay
|
||||
]
|
@ -9,10 +9,12 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Duckling.Time.ZH.Corpus
|
||||
( corpus ) where
|
||||
( corpus
|
||||
, defaultCorpus
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.String
|
||||
import Prelude
|
||||
|
||||
import Duckling.Locale
|
||||
import Duckling.Resolve
|
||||
@ -20,6 +22,9 @@ import Duckling.Time.Corpus
|
||||
import Duckling.TimeGrain.Types hiding (add)
|
||||
import Duckling.Testing.Types hiding (examples)
|
||||
|
||||
defaultCorpus :: Corpus
|
||||
defaultCorpus = corpus
|
||||
|
||||
corpus :: Corpus
|
||||
corpus = (testContext {locale = makeLocale ZH Nothing}, allExamples)
|
||||
|
||||
@ -482,22 +487,12 @@ allExamples = concat
|
||||
[ "建军节"
|
||||
, "建軍節"
|
||||
]
|
||||
, examples (datetime (2013, 10, 1, 0, 0, 0) Day)
|
||||
[ "国庆"
|
||||
, "國慶"
|
||||
, "国庆节"
|
||||
, "國慶節"
|
||||
]
|
||||
, examples (datetime (2013, 12, 25, 0, 0, 0) Day)
|
||||
[ "圣诞"
|
||||
, "聖誕"
|
||||
, "圣诞节"
|
||||
, "聖誕節"
|
||||
]
|
||||
, examples (datetimeInterval ((2013, 10, 1, 18, 0, 0), (2013, 10, 2, 0, 0, 0)) Hour)
|
||||
[ "国庆节晚上"
|
||||
, "國慶節晚上"
|
||||
]
|
||||
, examples (datetime (2013, 6, 1, 15, 15, 0) Minute)
|
||||
[ "儿童节下午三点十五"
|
||||
, "兒童節下午三點十五"
|
||||
|
37
Duckling/Time/ZH/HK/Corpus.hs
Normal file
37
Duckling/Time/ZH/HK/Corpus.hs
Normal file
@ -0,0 +1,37 @@
|
||||
-- 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.ZH.HK.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 hiding (add)
|
||||
|
||||
allExamples :: [Example]
|
||||
allExamples = concat
|
||||
[ examples (datetime (2013, 10, 1, 0, 0, 0) Day)
|
||||
[ "国庆"
|
||||
, "國慶"
|
||||
, "国庆节"
|
||||
, "国庆節"
|
||||
, "國慶节"
|
||||
, "國慶節"
|
||||
]
|
||||
, examples (datetimeInterval ((2013, 10, 1, 18, 0, 0), (2013, 10, 2, 0, 0, 0)) Hour)
|
||||
[ "国庆节晚上"
|
||||
, "國慶節晚上"
|
||||
]
|
||||
]
|
35
Duckling/Time/ZH/HK/Rules.hs
Normal file
35
Duckling/Time/ZH/HK/Rules.hs
Normal file
@ -0,0 +1,35 @@
|
||||
-- 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.ZH.HK.Rules
|
||||
( rules
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Duckling.Regex.Types
|
||||
import Duckling.Time.Helpers
|
||||
import Duckling.Types
|
||||
|
||||
ruleNationalDay :: Rule
|
||||
ruleNationalDay = Rule
|
||||
{ name = "national day"
|
||||
, pattern =
|
||||
[ regex "(国庆|國慶)(节|節)?"
|
||||
]
|
||||
, prod = \_ -> tt $ monthDay 10 1
|
||||
}
|
||||
|
||||
rules :: [Rule]
|
||||
rules =
|
||||
[ ruleNationalDay
|
||||
]
|
37
Duckling/Time/ZH/MO/Corpus.hs
Normal file
37
Duckling/Time/ZH/MO/Corpus.hs
Normal file
@ -0,0 +1,37 @@
|
||||
-- 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.ZH.MO.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 hiding (add)
|
||||
|
||||
allExamples :: [Example]
|
||||
allExamples = concat
|
||||
[ examples (datetime (2013, 10, 1, 0, 0, 0) Day)
|
||||
[ "国庆"
|
||||
, "國慶"
|
||||
, "国庆节"
|
||||
, "国庆節"
|
||||
, "國慶节"
|
||||
, "國慶節"
|
||||
]
|
||||
, examples (datetimeInterval ((2013, 10, 1, 18, 0, 0), (2013, 10, 2, 0, 0, 0)) Hour)
|
||||
[ "国庆节晚上"
|
||||
, "國慶節晚上"
|
||||
]
|
||||
]
|
35
Duckling/Time/ZH/MO/Rules.hs
Normal file
35
Duckling/Time/ZH/MO/Rules.hs
Normal file
@ -0,0 +1,35 @@
|
||||
-- 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.ZH.MO.Rules
|
||||
( rules
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Duckling.Regex.Types
|
||||
import Duckling.Time.Helpers
|
||||
import Duckling.Types
|
||||
|
||||
ruleNationalDay :: Rule
|
||||
ruleNationalDay = Rule
|
||||
{ name = "national day"
|
||||
, pattern =
|
||||
[ regex "(国庆|國慶)(节|節)?"
|
||||
]
|
||||
, prod = \_ -> tt $ monthDay 10 1
|
||||
}
|
||||
|
||||
rules :: [Rule]
|
||||
rules =
|
||||
[ ruleNationalDay
|
||||
]
|
@ -11,7 +11,8 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module Duckling.Time.ZH.Rules
|
||||
( rules ) where
|
||||
( rules
|
||||
) where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Prelude
|
||||
@ -301,15 +302,6 @@ ruleNow = Rule
|
||||
, prod = \_ -> tt $ cycleNth TG.Second 0
|
||||
}
|
||||
|
||||
ruleNationalDay :: Rule
|
||||
ruleNationalDay = Rule
|
||||
{ name = "national day"
|
||||
, pattern =
|
||||
[ regex "(国庆|國慶)(节|節)?"
|
||||
]
|
||||
, prod = \_ -> tt $ monthDay 10 1
|
||||
}
|
||||
|
||||
ruleTheCycleAfterTime :: Rule
|
||||
ruleTheCycleAfterTime = Rule
|
||||
{ name = "the <cycle> after <time>"
|
||||
@ -1049,7 +1041,6 @@ rules =
|
||||
, ruleMonthNumericWithMonthSymbol
|
||||
, ruleMorning
|
||||
, ruleNamedmonthDayofmonth
|
||||
, ruleNationalDay
|
||||
, ruleNewYearsDay
|
||||
, ruleNextCycle
|
||||
, ruleNextNCycle
|
||||
|
37
Duckling/Time/ZH/TW/Corpus.hs
Normal file
37
Duckling/Time/ZH/TW/Corpus.hs
Normal file
@ -0,0 +1,37 @@
|
||||
-- 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.ZH.TW.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 hiding (add)
|
||||
|
||||
allExamples :: [Example]
|
||||
allExamples = concat
|
||||
[ examples (datetime (2013, 10, 10, 0, 0, 0) Day)
|
||||
[ "国庆"
|
||||
, "國慶"
|
||||
, "国庆节"
|
||||
, "国庆節"
|
||||
, "國慶节"
|
||||
, "國慶節"
|
||||
]
|
||||
, examples (datetimeInterval ((2013, 10, 10, 18, 0, 0), (2013, 10, 11, 0, 0, 0)) Hour)
|
||||
[ "国庆节晚上"
|
||||
, "國慶節晚上"
|
||||
]
|
||||
]
|
35
Duckling/Time/ZH/TW/Rules.hs
Normal file
35
Duckling/Time/ZH/TW/Rules.hs
Normal file
@ -0,0 +1,35 @@
|
||||
-- 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.ZH.TW.Rules
|
||||
( rules
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Duckling.Regex.Types
|
||||
import Duckling.Time.Helpers
|
||||
import Duckling.Types
|
||||
|
||||
ruleNationalDay :: Rule
|
||||
ruleNationalDay = Rule
|
||||
{ name = "national day"
|
||||
, pattern =
|
||||
[ regex "(国庆|國慶)(节|節)?"
|
||||
]
|
||||
, prod = \_ -> tt $ monthDay 10 10
|
||||
}
|
||||
|
||||
rules :: [Rule]
|
||||
rules =
|
||||
[ ruleNationalDay
|
||||
]
|
@ -108,6 +108,10 @@ library
|
||||
, Duckling.Ranking.Classifiers.TR_XX
|
||||
, Duckling.Ranking.Classifiers.UK_XX
|
||||
, Duckling.Ranking.Classifiers.VI_XX
|
||||
, Duckling.Ranking.Classifiers.ZH_CN
|
||||
, Duckling.Ranking.Classifiers.ZH_HK
|
||||
, Duckling.Ranking.Classifiers.ZH_MO
|
||||
, Duckling.Ranking.Classifiers.ZH_TW
|
||||
, Duckling.Ranking.Classifiers.ZH_XX
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
@ -466,6 +470,14 @@ library
|
||||
, Duckling.Time.VI.Rules
|
||||
, Duckling.Time.ZH.Corpus
|
||||
, Duckling.Time.ZH.Rules
|
||||
, Duckling.Time.ZH.CN.Corpus
|
||||
, Duckling.Time.ZH.CN.Rules
|
||||
, Duckling.Time.ZH.HK.Corpus
|
||||
, Duckling.Time.ZH.HK.Rules
|
||||
, Duckling.Time.ZH.MO.Corpus
|
||||
, Duckling.Time.ZH.MO.Rules
|
||||
, Duckling.Time.ZH.TW.Corpus
|
||||
, Duckling.Time.ZH.TW.Rules
|
||||
, Duckling.Time.Corpus
|
||||
, Duckling.Time.Helpers
|
||||
, Duckling.Time.Types
|
||||
|
@ -47,6 +47,10 @@ import qualified Duckling.Time.RO.Corpus as ROTime
|
||||
import qualified Duckling.Time.SV.Corpus as SVTime
|
||||
import qualified Duckling.Time.VI.Corpus as VITime
|
||||
import qualified Duckling.Time.ZH.Corpus as ZHTime
|
||||
import qualified Duckling.Time.ZH.CN.Corpus as ZH_CNTime
|
||||
import qualified Duckling.Time.ZH.HK.Corpus as ZH_HKTime
|
||||
import qualified Duckling.Time.ZH.MO.Corpus as ZH_MOTime
|
||||
import qualified Duckling.Time.ZH.TW.Corpus as ZH_TWTime
|
||||
|
||||
-- -----------------------------------------------------------------
|
||||
-- Main
|
||||
@ -186,6 +190,10 @@ getCorpusForLang ZH = ZHTime.corpus
|
||||
getExamplesForLocale :: Lang -> Region -> [Example]
|
||||
getExamplesForLocale EN GB = EN_GBTime.allExamples
|
||||
getExamplesForLocale EN US = EN_USTime.allExamples
|
||||
getExamplesForLocale ZH CN = ZH_CNTime.allExamples
|
||||
getExamplesForLocale ZH HK = ZH_HKTime.allExamples
|
||||
getExamplesForLocale ZH MO = ZH_MOTime.allExamples
|
||||
getExamplesForLocale ZH TW = ZH_TWTime.allExamples
|
||||
getExamplesForLocale _ _ = []
|
||||
|
||||
-- -----------------------------------------------------------------
|
||||
|
@ -10,22 +10,16 @@ module Duckling.Duration.ZH.Tests
|
||||
( tests
|
||||
) where
|
||||
|
||||
import Prelude
|
||||
import Data.String
|
||||
import Prelude
|
||||
import Test.Tasty
|
||||
import Test.Tasty.HUnit
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
import Duckling.Duration.ZH.Corpus
|
||||
import Duckling.Locale
|
||||
import Duckling.Resolve
|
||||
import Duckling.Testing.Asserts
|
||||
import Duckling.Testing.Types
|
||||
|
||||
tests :: TestTree
|
||||
tests = testGroup "ZH Tests"
|
||||
[ testCase "Corpus Tests" $
|
||||
mapM_ (analyzedFirstTest context {locale = makeLocale ZH Nothing} . withTargets [This Duration])
|
||||
xs
|
||||
[ makeCorpusTest [This Duration] corpus
|
||||
]
|
||||
where
|
||||
(context, xs) = corpus
|
||||
|
@ -7,17 +7,46 @@
|
||||
|
||||
|
||||
module Duckling.Time.ZH.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.ZH.Corpus
|
||||
import qualified Duckling.Time.ZH.CN.Corpus as CN
|
||||
import qualified Duckling.Time.ZH.HK.Corpus as HK
|
||||
import qualified Duckling.Time.ZH.MO.Corpus as MO
|
||||
import qualified Duckling.Time.ZH.TW.Corpus as TW
|
||||
|
||||
tests :: TestTree
|
||||
tests = testGroup "ZH Tests"
|
||||
[ makeCorpusTest [This Time] corpus
|
||||
[ makeCorpusTest [This Time] defaultCorpus
|
||||
, localeTests
|
||||
]
|
||||
|
||||
localeTests :: TestTree
|
||||
localeTests = testGroup "Locale Tests"
|
||||
[ testGroup "ZH_CN Tests"
|
||||
[ makeCorpusTest [This Time] $ withLocale corpus localeCN CN.allExamples
|
||||
]
|
||||
, testGroup "ZH_HK Tests"
|
||||
[ makeCorpusTest [This Time] $ withLocale corpus localeHK HK.allExamples
|
||||
]
|
||||
, testGroup "ZH_MO Tests"
|
||||
[ makeCorpusTest [This Time] $ withLocale corpus localeMO MO.allExamples
|
||||
]
|
||||
, testGroup "ZH_TW Tests"
|
||||
[ makeCorpusTest [This Time] $ withLocale corpus localeTW TW.allExamples
|
||||
]
|
||||
]
|
||||
where
|
||||
localeCN = makeLocale ZH $ Just CN
|
||||
localeHK = makeLocale ZH $ Just HK
|
||||
localeMO = makeLocale ZH $ Just MO
|
||||
localeTW = makeLocale ZH $ Just TW
|
||||
|
Loading…
Reference in New Issue
Block a user