mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
support "noon" phrase in ES
Summary: This fix is to add support to parse alternative phrase, in ES, for "noon". Currently the supported ES phrase for "noon" is "mediodia", the alternative form is "medio<whitespace*>dia". Reviewed By: chinmay87 Differential Revision: D22188049 fbshipit-source-id: 798b83be75798f3b0d695a0f01a65dc84af98e22
This commit is contained in:
parent
dddb4adf23
commit
7b2def024e
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -1119,11 +1119,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("noon",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1},
|
||||
ClassData{prior = -0.2876820724517809,
|
||||
unseen = -1.6094379124341003,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
|
||||
koData =
|
||||
ClassData{prior = -0.6931471805599453,
|
||||
ClassData{prior = -1.3862943611198906,
|
||||
unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 1}}),
|
||||
("evening",
|
||||
|
@ -219,6 +219,8 @@ allExamples = concat
|
||||
, examples (datetime (2013, 2, 12, 12, 0, 0) Hour)
|
||||
[ "mediodía"
|
||||
, "las doce"
|
||||
, "medio dia"
|
||||
, "medio día"
|
||||
]
|
||||
, examples (datetime (2013, 2, 12, 12, 15, 0) Minute)
|
||||
[ "las doce y cuarto"
|
||||
|
@ -281,7 +281,7 @@ ruleNoon :: Rule
|
||||
ruleNoon = Rule
|
||||
{ name = "noon"
|
||||
, pattern =
|
||||
[ regex "mediod(í|i)a"
|
||||
[ regex "medio(\\s*)d(í|i)a"
|
||||
]
|
||||
, prod = \_ -> tt $ hour False 12
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user