mirror of
https://github.com/facebook/duckling.git
synced 2024-08-17 17:20:55 +03:00
Time/VI: update rule Sunday (#611)
Summary: In Vietnam, sunday is "chủ nhật" or "Chúa nhật (Catholic)". Pull Request resolved: https://github.com/facebook/duckling/pull/611 Reviewed By: haoxuany Differential Revision: D28399277 Pulled By: chessai fbshipit-source-id: 26aa7c76cf1f8b8c2ba32e049f7f470a140e3d92
This commit is contained in:
parent
99e1dce9c4
commit
25b39f4a8b
@ -41,10 +41,10 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("integer (numeric)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.5108256237659907, unseen = -4.61512051684126,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 99},
|
||||
ClassData{prior = -0.5028732955754956, unseen = -4.634728988229636,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 101},
|
||||
koData =
|
||||
ClassData{prior = -0.916290731874155, unseen = -4.219507705176107,
|
||||
ClassData{prior = -0.9283390703903296, unseen = -4.219507705176107,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 66}}),
|
||||
("exactly <time-of-day>",
|
||||
Classifier{okData =
|
||||
@ -93,21 +93,21 @@ classifiers
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 5}}),
|
||||
("<part-of-day> <time>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.40546510810816444,
|
||||
unseen = -3.4657359027997265,
|
||||
ClassData{prior = -0.3746934494414107,
|
||||
unseen = -3.5263605246161616,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("hourday", -1.0360919316867756),
|
||||
("noonh\244m nay", -2.740840023925201),
|
||||
("lunchng\224y mai", -2.3353749158170367),
|
||||
("noonng\224y h\244m qua", -2.3353749158170367),
|
||||
("morningSunday", -2.740840023925201),
|
||||
("noonng\224y mai", -2.3353749158170367),
|
||||
("afternoonng\224y dd/mm", -2.740840023925201),
|
||||
("afternoonng\224y mai", -2.740840023925201)],
|
||||
n = 10},
|
||||
[("hourday", -1.0116009116784799),
|
||||
("noonh\244m nay", -2.803360380906535),
|
||||
("lunchng\224y mai", -2.3978952727983707),
|
||||
("noonng\224y h\244m qua", -2.3978952727983707),
|
||||
("morningSunday", -2.3978952727983707),
|
||||
("noonng\224y mai", -2.3978952727983707),
|
||||
("afternoonng\224y dd/mm", -2.803360380906535),
|
||||
("afternoonng\224y mai", -2.803360380906535)],
|
||||
n = 11},
|
||||
koData =
|
||||
ClassData{prior = -1.0986122886681098,
|
||||
ClassData{prior = -1.1631508098056809,
|
||||
unseen = -3.0910424533583156,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
@ -153,12 +153,11 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (grain)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -1.4271163556401458,
|
||||
unseen = -2.0794415416798357,
|
||||
ClassData{prior = -1.466337068793427, unseen = -2.0794415416798357,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 6},
|
||||
koData =
|
||||
ClassData{prior = -0.2744368457017603, unseen = -3.044522437723423,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 19}}),
|
||||
ClassData{prior = -0.262364264467491, unseen = -3.0910424533583156,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20}}),
|
||||
("Wednesday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
@ -190,65 +189,66 @@ classifiers
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 20}}),
|
||||
("intersect",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.24921579162398486,
|
||||
unseen = -5.017279836814924,
|
||||
ClassData{prior = -0.24512245803298496,
|
||||
unseen = -5.030437921392435,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> s\225ng|chi\7873u|t\7889ing\224y dd/mm",
|
||||
-3.624340932976365),
|
||||
("hourday", -3.624340932976365), ("dayhour", -4.31748811353631),
|
||||
-3.6375861597263857),
|
||||
("hourday", -3.6375861597263857),
|
||||
("dayhour", -4.330733340286331),
|
||||
("h\244m nay<time-of-day> s\225ng|chi\7873u|t\7889i",
|
||||
-4.31748811353631),
|
||||
("monthyear", -3.4011973816621555),
|
||||
("Wednesdaynext <cycle>", -4.31748811353631),
|
||||
-4.330733340286331),
|
||||
("monthyear", -3.414442608412176),
|
||||
("Wednesdaynext <cycle>", -4.330733340286331),
|
||||
("Tuesday<day-of-month> (numeric with day symbol) <named-month>",
|
||||
-4.31748811353631),
|
||||
("time-of-day gi\7901<part-of-day> <time>", -4.31748811353631),
|
||||
-4.330733340286331),
|
||||
("time-of-day gi\7901<part-of-day> <time>", -4.330733340286331),
|
||||
("Sunday<day-of-month> (numeric with day symbol) <named-month>",
|
||||
-3.912023005428146),
|
||||
("time-of-day gi\7901<time> n\224y", -4.31748811353631),
|
||||
-3.6375861597263857),
|
||||
("time-of-day gi\7901<time> n\224y", -4.330733340286331),
|
||||
("month (numeric with month symbol)year (numeric with year symbol)",
|
||||
-3.624340932976365),
|
||||
("dayday", -2.6127400212978853),
|
||||
("hourhour", -3.4011973816621555),
|
||||
-3.6375861597263857),
|
||||
("dayday", -2.538973871058276),
|
||||
("hourhour", -3.414442608412176),
|
||||
("intersectyear (numeric with year symbol)",
|
||||
-3.624340932976365),
|
||||
("dayyear", -2.445685936634719),
|
||||
-3.6375861597263857),
|
||||
("dayyear", -2.4589311633847397),
|
||||
("<ordinal> <cycle> of <time>year (numeric with year symbol)",
|
||||
-4.31748811353631),
|
||||
("minutehour", -3.912023005428146),
|
||||
-4.330733340286331),
|
||||
("minutehour", -3.925268232178167),
|
||||
("<time-of-day> s\225ng|chi\7873u|t\7889iintersect",
|
||||
-3.912023005428146),
|
||||
("Thursdaynext <cycle>", -3.912023005428146),
|
||||
("Octoberyear (numeric with year symbol)", -4.31748811353631),
|
||||
-3.925268232178167),
|
||||
("Thursdaynext <cycle>", -3.925268232178167),
|
||||
("Octoberyear (numeric with year symbol)", -4.330733340286331),
|
||||
("time-of-day gi\7901<part-of-day> (h\244m )?nay",
|
||||
-4.31748811353631),
|
||||
-4.330733340286331),
|
||||
("<day-of-month> (numeric with day symbol) <named-month>year (numeric with year symbol)",
|
||||
-3.2188758248682006),
|
||||
-3.2321210516182215),
|
||||
("<time-of-day> s\225ng|chi\7873u|t\7889i<day-of-month> (numeric with day symbol) <named-month>",
|
||||
-3.4011973816621555),
|
||||
("time-of-day gi\7901tonight", -4.31748811353631),
|
||||
("minuteday", -2.8134107167600364),
|
||||
("hh:mm<part-of-day> <time>", -4.31748811353631),
|
||||
-3.414442608412176),
|
||||
("time-of-day gi\7901tonight", -4.330733340286331),
|
||||
("minuteday", -2.826655943510057),
|
||||
("hh:mm<part-of-day> <time>", -4.330733340286331),
|
||||
("<day-of-month> <named-month>year (numeric with year symbol)",
|
||||
-3.2188758248682006),
|
||||
("Fridaythis <cycle>", -3.912023005428146),
|
||||
("Thursdaythis <cycle>", -4.31748811353631),
|
||||
("at hh:mm<part-of-day> <time>", -4.31748811353631),
|
||||
("dayweek", -3.0647251450409425),
|
||||
("weekyear", -4.31748811353631),
|
||||
-3.2321210516182215),
|
||||
("Fridaythis <cycle>", -3.925268232178167),
|
||||
("Thursdaythis <cycle>", -4.330733340286331),
|
||||
("at hh:mm<part-of-day> <time>", -4.330733340286331),
|
||||
("dayweek", -3.077970371790963),
|
||||
("weekyear", -4.330733340286331),
|
||||
("<time-of-day> s\225ng|chi\7873u|t\7889ing\224y dd/mm/yyyy",
|
||||
-4.31748811353631),
|
||||
-4.330733340286331),
|
||||
("<time-of-day> s\225ng|chi\7873u|t\7889ing\224y mai",
|
||||
-4.31748811353631),
|
||||
("Tuesdayintersect", -4.31748811353631),
|
||||
-4.330733340286331),
|
||||
("Tuesdayintersect", -4.330733340286331),
|
||||
("Monday<day-of-month> (numeric with day symbol) <named-month>",
|
||||
-3.0647251450409425),
|
||||
("seasonthis <cycle>", -4.31748811353631),
|
||||
("minuteyear", -3.912023005428146)],
|
||||
n = 53},
|
||||
-3.077970371790963),
|
||||
("seasonthis <cycle>", -4.330733340286331),
|
||||
("minuteyear", -3.925268232178167)],
|
||||
n = 54},
|
||||
koData =
|
||||
ClassData{prior = -1.5114575040738967, unseen = -4.31748811353631,
|
||||
ClassData{prior = -1.5260563034950494, unseen = -4.31748811353631,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("<time-of-day> s\225ng|chi\7873u|t\7889ing\224y dd/mm",
|
||||
@ -533,12 +533,12 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("month (numeric with month symbol)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.4339872044851463,
|
||||
ClassData{prior = 0.0, unseen = -3.4657359027997265,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)", -0.2231435513142097),
|
||||
("integer (0..19)", -1.6094379124341003)],
|
||||
n = 28},
|
||||
[("integer (numeric)", -0.21511137961694557),
|
||||
("integer (0..19)", -1.6422277352570913)],
|
||||
n = 29},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.0986122886681098,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
@ -592,8 +592,8 @@ classifiers
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 11}}),
|
||||
("Sunday",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.791759469228055,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 4},
|
||||
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}}),
|
||||
@ -690,27 +690,27 @@ classifiers
|
||||
ClassData{prior = -infinity, unseen = -2.995732273553991,
|
||||
likelihoods = HashMap.fromList [], n = 0},
|
||||
koData =
|
||||
ClassData{prior = 0.0, unseen = -5.225746673713201,
|
||||
ClassData{prior = 0.0, unseen = -5.236441962829949,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("week", -3.42859635585027),
|
||||
("integer (0..19)year (grain)", -4.527208644518379),
|
||||
("integer (numeric)day (grain)", -3.0231312477421053),
|
||||
("integer (0..19)hour (grain)", -3.834061463958434),
|
||||
("second", -3.6109179126442243),
|
||||
("integer (numeric)second (grain)", -3.6109179126442243),
|
||||
("integer (numeric)year (grain)", -2.655406467616788),
|
||||
("day", -2.822460552279954), ("year", -2.581298495463066),
|
||||
("integer (numeric)week (grain)", -4.121743536410215),
|
||||
("integer (0..19)month (grain)", -4.527208644518379),
|
||||
("hour", -2.001480000210124), ("month", -2.042301994730379),
|
||||
("integer (numeric)minute (grain)", -3.6109179126442243),
|
||||
("integer (numeric)month (grain)", -2.084861609149175),
|
||||
("minute", -3.6109179126442243),
|
||||
("integer (numeric)hour (grain)", -2.129313371720009),
|
||||
("integer (0..19)day (grain)", -4.121743536410215),
|
||||
("integer (0..19)week (grain)", -3.834061463958434)],
|
||||
n = 83}}),
|
||||
[("week", -3.4393491476265314),
|
||||
("integer (0..19)year (grain)", -4.537961436294641),
|
||||
("integer (numeric)day (grain)", -3.0338840395183673),
|
||||
("integer (0..19)hour (grain)", -3.844814255734696),
|
||||
("second", -3.6216707044204863),
|
||||
("integer (numeric)second (grain)", -3.6216707044204863),
|
||||
("integer (numeric)year (grain)", -2.66615925939305),
|
||||
("day", -2.833213344056216), ("year", -2.592051287239328),
|
||||
("integer (numeric)week (grain)", -4.132496328186477),
|
||||
("integer (0..19)month (grain)", -4.537961436294641),
|
||||
("hour", -2.012232791986386), ("month", -2.012232791986386),
|
||||
("integer (numeric)minute (grain)", -3.6216707044204863),
|
||||
("integer (numeric)month (grain)", -2.053054786506641),
|
||||
("minute", -3.6216707044204863),
|
||||
("integer (numeric)hour (grain)", -2.1400661634962708),
|
||||
("integer (0..19)day (grain)", -4.132496328186477),
|
||||
("integer (0..19)week (grain)", -3.844814255734696)],
|
||||
n = 84}}),
|
||||
("<time-of-day> am|pm",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
@ -857,17 +857,17 @@ classifiers
|
||||
n = 2}}),
|
||||
("<day-of-month> <named-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = -0.10008345855698253,
|
||||
unseen = -3.7376696182833684,
|
||||
ClassData{prior = -9.53101798043249e-2,
|
||||
unseen = -3.784189633918261,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)month (numeric with month symbol)",
|
||||
-0.8232003088081431),
|
||||
("month", -0.7178397931503169),
|
||||
("integer (numeric)March", -2.6149597780361984)],
|
||||
n = 19},
|
||||
-0.8167611365271219),
|
||||
("month", -0.7166776779701395),
|
||||
("integer (numeric)March", -2.662587827025453)],
|
||||
n = 20},
|
||||
koData =
|
||||
ClassData{prior = -2.3513752571634776,
|
||||
ClassData{prior = -2.3978952727983707,
|
||||
unseen = -2.0794415416798357,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
@ -911,8 +911,8 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("morning",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [("", 0.0)], n = 2},
|
||||
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}}),
|
||||
@ -938,14 +938,14 @@ classifiers
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("<day-of-month> (numeric with day symbol) <named-month>",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -3.784189633918261,
|
||||
ClassData{prior = 0.0, unseen = -3.828641396489095,
|
||||
likelihoods =
|
||||
HashMap.fromList
|
||||
[("integer (numeric)month (numeric with month symbol)",
|
||||
-0.8167611365271219),
|
||||
("month", -0.7166776779701395),
|
||||
("integer (numeric)March", -2.662587827025453)],
|
||||
n = 20},
|
||||
-0.8109302162163288),
|
||||
("month", -0.7156200364120039),
|
||||
("integer (numeric)March", -2.70805020110221)],
|
||||
n = 21},
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -1.3862943611198906,
|
||||
likelihoods = HashMap.fromList [], n = 0}})]
|
@ -75,6 +75,7 @@ allExamples = concat
|
||||
]
|
||||
, examples (datetime (2017, 2, 5, 0, 0, 0) Day)
|
||||
[ "chủ nhật"
|
||||
, "chúa nhật"
|
||||
]
|
||||
, examples (datetime (2017, 6, 1, 0, 0, 0) Month)
|
||||
[ "tháng 6"
|
||||
@ -124,6 +125,7 @@ allExamples = concat
|
||||
, examples (datetime (2017, 4, 9, 0, 0, 0) Day)
|
||||
[ "chủ nhật ngày mồng 9 tháng 4"
|
||||
, "chủ nhật ngày 9 tháng 4"
|
||||
, "chúa nhật ngày 9 tháng 4"
|
||||
]
|
||||
, examples (datetime (2017, 2, 6, 0, 0, 0) Day)
|
||||
[ "thứ 2 ngày 6 tháng 2"
|
||||
@ -292,6 +294,7 @@ allExamples = concat
|
||||
]
|
||||
, examples (datetimeInterval ((2017, 2, 5, 4, 0, 0), (2017, 2, 5, 12, 0, 0)) Hour)
|
||||
[ "sáng chủ nhật"
|
||||
, "sáng chúa nhật"
|
||||
]
|
||||
, examples (datetimeInterval ((2017, 2, 2, 3, 54, 58), (2017, 2, 2, 3, 55, 0)) Second)
|
||||
[ "2 giây vừa rồi"
|
||||
|
@ -47,7 +47,7 @@ ruleDaysOfWeek = mkRuleDaysOfWeek
|
||||
, ( "Thursday" , "th(ứ) (5|n(ă)m)" )
|
||||
, ( "Friday" , "th(ứ) 6|th(ứ) s(á)u" )
|
||||
, ( "Saturday" , "th(ứ) (7|b((ả)|(ẩ))y)" )
|
||||
, ( "Sunday" , "ch(ủ) nh(ậ)t" )
|
||||
, ( "Sunday" , "ch((ủ)|(ú)a) nh(ậ)t" )
|
||||
]
|
||||
|
||||
ruleMonths :: [Rule]
|
||||
|
Loading…
Reference in New Issue
Block a user