diff --git a/Duckling/Duration/EN/Corpus.hs b/Duckling/Duration/EN/Corpus.hs index c6ba928f..09943866 100644 --- a/Duckling/Duration/EN/Corpus.hs +++ b/Duckling/Duration/EN/Corpus.hs @@ -62,6 +62,26 @@ allExamples = concat , examples (DurationData 2 Year) [ "2 years" ] + , examples (DurationData 30 Minute) + [ "half an hour" + , "half hour" + , "1/2 hour" + , "1/2h" + , "1/2 h" + ] + , examples (DurationData 12 Hour) + [ "half a day" + , "half day" + , "1/2 day" + ] + , examples (DurationData 90 Minute) + [ "an hour and a half" + , "one hour and half" + ] + , examples (DurationData 45 Day) + [ "a month and a half" + , "one month and half" + ] , examples (DurationData 27 Month) [ "2 years and 3 months" , "2 years, 3 months" diff --git a/Duckling/Duration/EN/Rules.hs b/Duckling/Duration/EN/Rules.hs index 5eac9e91..4c767177 100644 --- a/Duckling/Duration/EN/Rules.hs +++ b/Duckling/Duration/EN/Rules.hs @@ -40,11 +40,11 @@ ruleDurationQuarterOfAnHour = Rule , prod = \_ -> Just . Token Duration $ duration TG.Minute 15 } -ruleDurationHalfAnHour :: Rule -ruleDurationHalfAnHour = Rule - { name = "half an hour" +ruleDurationHalfAnHourAbbrev :: Rule +ruleDurationHalfAnHourAbbrev = Rule + { name = "half an hour (abbrev)." , pattern = - [ regex "(1/2\\s?h(our)?|half an? hour)" + [ regex "1/2\\s?h" ] , prod = \_ -> Just . Token Duration $ duration TG.Minute 30 } @@ -138,6 +138,31 @@ ruleDurationA = Rule _ -> Nothing } +ruleDurationHalfATimeGrain :: Rule +ruleDurationHalfATimeGrain = Rule + { name = "half a " + , pattern = + [ regex "(1/2|half)( an?)?" + , dimension TimeGrain + ] + , prod = \case + (_:Token TimeGrain grain:_) -> Token Duration <$> timesOneAndAHalf grain 0 + _ -> Nothing + } + +ruleDurationOneGrainAndHalf :: Rule +ruleDurationOneGrainAndHalf = Rule + { name = "a and a half" + , pattern = + [ regex "an?|one" + , dimension TimeGrain + , regex "and (a )?half" + ] + , prod = \case + (_:Token TimeGrain grain:_) -> Token Duration <$> timesOneAndAHalf grain 1 + _ -> Nothing + } + ruleDurationPrecision :: Rule ruleDurationPrecision = Rule { name = "about|exactly " @@ -171,13 +196,15 @@ ruleCompositeDuration = Rule rules :: [Rule] rules = [ ruleDurationQuarterOfAnHour - , ruleDurationHalfAnHour + , ruleDurationHalfAnHourAbbrev , ruleDurationThreeQuartersOfAnHour , ruleDurationFortnight , ruleDurationNumeralMore , ruleDurationDotNumeralHours , ruleDurationAndHalfHour , ruleDurationA + , ruleDurationHalfATimeGrain + , ruleDurationOneGrainAndHalf , ruleDurationPrecision , ruleNumeralQuotes , ruleCompositeDuration diff --git a/Duckling/Ranking/Classifiers/EN_AU.hs b/Duckling/Ranking/Classifiers/EN_AU.hs index 7a06edfb..f50adfd8 100644 --- a/Duckling/Ranking/Classifiers/EN_AU.hs +++ b/Duckling/Ranking/Classifiers/EN_AU.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_BZ.hs b/Duckling/Ranking/Classifiers/EN_BZ.hs index 1799d0df..47d94c12 100644 --- a/Duckling/Ranking/Classifiers/EN_BZ.hs +++ b/Duckling/Ranking/Classifiers/EN_BZ.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_CA.hs b/Duckling/Ranking/Classifiers/EN_CA.hs index 53598eb1..28113bea 100644 --- a/Duckling/Ranking/Classifiers/EN_CA.hs +++ b/Duckling/Ranking/Classifiers/EN_CA.hs @@ -621,34 +621,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.13062018241706422, - unseen = -4.6443908991413725, + ClassData{prior = -0.12783337150988489, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.1000608288825715, - unseen = -3.4011973816621555, + ClassData{prior = -2.120263536200091, unseen = -3.4339872044851463, likelihoods = HashMap.fromList - [("quarter", -2.268683541318364), ("year", -1.7578579175523736), - (" ", -1.7578579175523736), - ("a ", -2.268683541318364)], + [("quarter", -2.3025850929940455), ("year", -1.791759469228055), + (" ", -1.791759469228055), + ("a ", -2.3025850929940455)], n = 6}}), ("January", Classifier{okData = @@ -724,12 +724,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1489,6 +1489,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1796,13 +1813,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5753641449035618, @@ -2686,7 +2696,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2715,6 +2725,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_GB.hs b/Duckling/Ranking/Classifiers/EN_GB.hs index 15e62c9c..a45e1ff8 100644 --- a/Duckling/Ranking/Classifiers/EN_GB.hs +++ b/Duckling/Ranking/Classifiers/EN_GB.hs @@ -622,33 +622,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -717,12 +718,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1458,6 +1459,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1738,13 +1756,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2618,7 +2629,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2647,6 +2658,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_IE.hs b/Duckling/Ranking/Classifiers/EN_IE.hs index d8d80444..c4458a27 100644 --- a/Duckling/Ranking/Classifiers/EN_IE.hs +++ b/Duckling/Ranking/Classifiers/EN_IE.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_IN.hs b/Duckling/Ranking/Classifiers/EN_IN.hs index 8efde0c0..fa427063 100644 --- a/Duckling/Ranking/Classifiers/EN_IN.hs +++ b/Duckling/Ranking/Classifiers/EN_IN.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_JM.hs b/Duckling/Ranking/Classifiers/EN_JM.hs index 76838164..992c1f3a 100644 --- a/Duckling/Ranking/Classifiers/EN_JM.hs +++ b/Duckling/Ranking/Classifiers/EN_JM.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_NZ.hs b/Duckling/Ranking/Classifiers/EN_NZ.hs index dcd46e60..e2342217 100644 --- a/Duckling/Ranking/Classifiers/EN_NZ.hs +++ b/Duckling/Ranking/Classifiers/EN_NZ.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_PH.hs b/Duckling/Ranking/Classifiers/EN_PH.hs index 33101a01..b926c783 100644 --- a/Duckling/Ranking/Classifiers/EN_PH.hs +++ b/Duckling/Ranking/Classifiers/EN_PH.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_TT.hs b/Duckling/Ranking/Classifiers/EN_TT.hs index c271a5d2..22ecca4a 100644 --- a/Duckling/Ranking/Classifiers/EN_TT.hs +++ b/Duckling/Ranking/Classifiers/EN_TT.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_US.hs b/Duckling/Ranking/Classifiers/EN_US.hs index 4d1dec18..c5ded1a9 100644 --- a/Duckling/Ranking/Classifiers/EN_US.hs +++ b/Duckling/Ranking/Classifiers/EN_US.hs @@ -635,34 +635,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.13062018241706422, - unseen = -4.6443908991413725, + ClassData{prior = -0.12783337150988489, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.1000608288825715, - unseen = -3.4011973816621555, + ClassData{prior = -2.120263536200091, unseen = -3.4339872044851463, likelihoods = HashMap.fromList - [("quarter", -2.268683541318364), ("year", -1.7578579175523736), - (" ", -1.7578579175523736), - ("a ", -2.268683541318364)], + [("quarter", -2.3025850929940455), ("year", -1.791759469228055), + (" ", -1.791759469228055), + ("a ", -2.3025850929940455)], n = 6}}), ("January", Classifier{okData = @@ -731,12 +731,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1508,6 +1508,23 @@ classifiers koData = ClassData{prior = -infinity, unseen = -0.6931471805599453, likelihoods = HashMap.fromList [], n = 0}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1809,13 +1826,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2730,7 +2740,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2759,6 +2769,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_XX.hs b/Duckling/Ranking/Classifiers/EN_XX.hs index 83e507e4..96594bea 100644 --- a/Duckling/Ranking/Classifiers/EN_XX.hs +++ b/Duckling/Ranking/Classifiers/EN_XX.hs @@ -616,35 +616,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.17062551703076334, - unseen = -4.653960350157523, + ClassData{prior = -0.1670540846631662, unseen = -4.68213122712422, likelihoods = HashMap.fromList - [("week", -3.258096538021482), - (" more ", -3.951243718581427), - ("three-quarters of an hour", -3.0349529867072724), - (" + '\"", -3.258096538021482), - ("number.number hours", -3.951243718581427), - ("second", -3.545778610473263), ("day", -3.258096538021482), - ("half an hour", -3.0349529867072724), - ("year", -3.951243718581427), - (" ", -1.5998684614179497), - ("a ", -3.0349529867072724), - ("quarter of an hour", -3.0349529867072724), - ("hour", -2.5649493574615367), - ("about|exactly ", -3.951243718581427), - (" and an half hour", -3.951243718581427), - ("minute", -1.3121863889661687)], - n = 43}, + [("week", -3.2865344733420154), + (" more ", -3.979681653901961), + ("three-quarters of an hour", -3.0633909220278057), + (" + '\"", -3.2865344733420154), + ("number.number hours", -3.979681653901961), + ("second", -3.5742165457937967), + ("half a ", -3.2865344733420154), + ("day", -3.2865344733420154), ("year", -3.979681653901961), + (" ", -1.6283063967384832), + ("a ", -3.0633909220278057), + ("quarter of an hour", -3.0633909220278057), + ("hour", -2.5933872927820705), + ("about|exactly ", -3.979681653901961), + ("half an hour (abbrev).", -3.5742165457937967), + (" and an half hour", -3.979681653901961), + ("minute", -1.3055330044754323)], + n = 44}, koData = - ClassData{prior = -1.8523840910444898, - unseen = -3.5553480614894135, + ClassData{prior = -1.8718021769015913, unseen = -3.58351893845611, likelihoods = HashMap.fromList - [("quarter", -2.4277482359480516), ("year", -1.7346010553881064), - (" ", -1.7346010553881064), - ("a ", -2.1400661634962708), - ("month", -2.833213344056216)], + [("quarter", -2.456735772821304), ("year", -1.7635885922613588), + (" ", -1.7635885922613588), + ("a ", -2.169053700369523), + ("month", -2.8622008809294686)], n = 8}}), ("January", Classifier{okData = @@ -713,12 +712,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1440,6 +1439,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1713,13 +1729,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2586,7 +2595,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2615,6 +2624,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, diff --git a/Duckling/Ranking/Classifiers/EN_ZA.hs b/Duckling/Ranking/Classifiers/EN_ZA.hs index ca281706..367c979d 100644 --- a/Duckling/Ranking/Classifiers/EN_ZA.hs +++ b/Duckling/Ranking/Classifiers/EN_ZA.hs @@ -613,33 +613,34 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("in|within|after ", Classifier{okData = - ClassData{prior = -0.11000089521432846, - unseen = -4.6443908991413725, + ClassData{prior = -0.10763066419236544, + unseen = -4.672828834461907, likelihoods = HashMap.fromList - [("week", -3.248434627109745), - (" more ", -3.9415818076696905), - ("three-quarters of an hour", -3.0252910757955354), - (" + '\"", -3.248434627109745), - ("number.number hours", -3.9415818076696905), - ("second", -3.536116699561526), ("day", -3.248434627109745), - ("half an hour", -3.0252910757955354), - ("year", -3.9415818076696905), - (" ", -1.5902065505062128), - ("a ", -3.0252910757955354), - ("quarter of an hour", -3.0252910757955354), - ("hour", -2.5552874465498), - ("about|exactly ", -3.9415818076696905), - (" and an half hour", -3.9415818076696905), - ("minute", -1.3025244780544318)], - n = 43}, + [("week", -3.2771447329921766), + (" more ", -3.970291913552122), + ("three-quarters of an hour", -3.054001181677967), + (" + '\"", -3.2771447329921766), + ("number.number hours", -3.970291913552122), + ("second", -3.5648268054439574), + ("half a ", -3.2771447329921766), + ("day", -3.2771447329921766), ("year", -3.970291913552122), + (" ", -1.6189166563886441), + ("a ", -3.054001181677967), + ("quarter of an hour", -3.054001181677967), + ("hour", -2.583997552432231), + ("about|exactly ", -3.970291913552122), + ("half an hour (abbrev).", -3.5648268054439574), + (" and an half hour", -3.970291913552122), + ("minute", -1.2961432641255932)], + n = 44}, koData = - ClassData{prior = -2.2617630984737906, unseen = -3.332204510175204, + ClassData{prior = -2.2823823856765264, unseen = -3.367295829986474, likelihoods = HashMap.fromList - [("quarter", -2.1972245773362196), ("year", -1.9095425048844386), - (" ", -1.9095425048844386), - ("a ", -2.1972245773362196)], + [("quarter", -2.2335922215070942), ("year", -1.9459101490553135), + (" ", -1.9459101490553135), + ("a ", -2.2335922215070942)], n = 5}}), ("January", Classifier{okData = @@ -708,12 +709,12 @@ classifiers likelihoods = HashMap.fromList [], n = 0}}), ("hour (grain)", Classifier{okData = - ClassData{prior = -0.8209805520698302, - unseen = -2.5649493574615367, - likelihoods = HashMap.fromList [("", 0.0)], n = 11}, + ClassData{prior = -0.5500463369192721, unseen = -2.833213344056216, + likelihoods = HashMap.fromList [("", 0.0)], n = 15}, koData = - ClassData{prior = -0.579818495252942, unseen = -2.772588722239781, - likelihoods = HashMap.fromList [("", 0.0)], n = 14}}), + ClassData{prior = -0.8602012652231115, + unseen = -2.5649493574615367, + likelihoods = HashMap.fromList [("", 0.0)], n = 11}}), ("Shavuot", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098, @@ -1426,6 +1427,23 @@ classifiers ("ordinals (first..twentieth,thirtieth,...)WednesdayOctober", -1.3862943611198906)], n = 3}}), + ("half a ", + Classifier{okData = + ClassData{prior = -0.2231435513142097, + unseen = -2.3978952727983707, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 4}, + koData = + ClassData{prior = -1.6094379124341003, + unseen = -1.6094379124341003, + likelihoods = + HashMap.fromList + [("hour (grain)", -0.6931471805599453), + ("hour", -0.6931471805599453)], + n = 1}}), ("Valentine's Day", Classifier{okData = ClassData{prior = 0.0, unseen = -1.3862943611198906, @@ -1699,13 +1717,6 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.9459101490553135, likelihoods = HashMap.fromList [], n = 0}}), - ("half an hour", - 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}}), ("the (ordinal)", Classifier{okData = ClassData{prior = -0.5108256237659907, @@ -2551,7 +2562,7 @@ classifiers ClassData{prior = 0.0, unseen = -1.6094379124341003, likelihoods = HashMap.fromList - [("half an hour", -0.6931471805599453), + [("half a ", -0.6931471805599453), ("minute", -0.6931471805599453)], n = 1}, koData = @@ -2580,6 +2591,13 @@ classifiers koData = ClassData{prior = -infinity, unseen = -1.0986122886681098, likelihoods = HashMap.fromList [], n = 0}}), + ("half an hour (abbrev).", + 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}}), ("hhmm (military) am|pm", Classifier{okData = ClassData{prior = 0.0, unseen = -1.0986122886681098,