From da41db3766707455e97c635a10c5864043710de8 Mon Sep 17 00:00:00 2001 From: Satya Bodduluri Date: Wed, 16 Aug 2017 14:06:45 -0700 Subject: [PATCH] Added ruleIntervalDDDDMonth to EN Summary: Added ruleIntervalDDDDMonth to EN to handle cases such as "23rd to 26th Oct" and "1-8 september" Reviewed By: patapizza Differential Revision: D5637280 fbshipit-source-id: a1fdcd2 --- Duckling/Ranking/Classifiers/EN.hs | 437 +++++++++++++++-------------- Duckling/Time/EN/Corpus.hs | 13 + Duckling/Time/EN/Rules.hs | 22 ++ 3 files changed, 265 insertions(+), 207 deletions(-) diff --git a/Duckling/Ranking/Classifiers/EN.hs b/Duckling/Ranking/Classifiers/EN.hs index fdabf3b4..ffa6b6ac 100644 --- a/Duckling/Ranking/Classifiers/EN.hs +++ b/Duckling/Ranking/Classifiers/EN.hs @@ -23,7 +23,7 @@ classifiers = HashMap.fromList [(" to|till|before ", Classifier{okData = - ClassData{prior = -1.9459101490553135, unseen = -1.791759469228055, + ClassData{prior = -2.0794415416798357, unseen = -1.791759469228055, likelihoods = HashMap.fromList [("integer (numeric)noon|midnight|EOD|end of day", @@ -31,13 +31,13 @@ classifiers ("hour", -0.916290731874155)], n = 1}, koData = - ClassData{prior = -0.15415067982725836, - unseen = -2.772588722239781, + ClassData{prior = -0.13353139262452263, + unseen = -2.890371757896165, likelihoods = HashMap.fromList - [("hour", -0.7621400520468967), - ("integer (numeric)time-of-day (latent)", -0.7621400520468967)], - n = 6}}), + [("hour", -0.7537718023763802), + ("integer (numeric)time-of-day (latent)", -0.7537718023763802)], + n = 7}}), ("