mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
implement 'the day after tomorrow' in Romanian
Summary: adds a rule for 'the day after tomorrow' in Romanian. regenerates classifiers. Reviewed By: girifb Differential Revision: D26155042 fbshipit-source-id: 80005ab94a10f9fbf242c9a712bd040e4f6bc477
This commit is contained in:
parent
d5fac5f14e
commit
33f0c17ee2
@ -185,6 +185,13 @@ classifiers
|
||||
koData =
|
||||
ClassData{prior = -infinity, unseen = -0.6931471805599453,
|
||||
likelihoods = HashMap.fromList [], n = 0}}),
|
||||
("the day after tomorrow",
|
||||
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}}),
|
||||
("<named-day> pe <day-of-month> (number)",
|
||||
Classifier{okData =
|
||||
ClassData{prior = 0.0, unseen = -1.6094379124341003,
|
||||
|
@ -95,4 +95,8 @@ allExamples = concat
|
||||
[ "ziua de craciun"
|
||||
, "crăciun"
|
||||
]
|
||||
, examples (datetime (2013, 2, 14, 0, 0, 0) Day)
|
||||
[ "poimaine"
|
||||
, "poimâine"
|
||||
]
|
||||
]
|
||||
|
@ -12,7 +12,6 @@
|
||||
module Duckling.Time.RO.Rules
|
||||
( rules ) where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Prelude
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
@ -26,6 +25,15 @@ import qualified Data.Text as Text
|
||||
import qualified Duckling.Time.Types as TTime
|
||||
import qualified Duckling.TimeGrain.Types as TG
|
||||
|
||||
ruleTheDayAfterTomorrow :: Rule
|
||||
ruleTheDayAfterTomorrow = Rule
|
||||
{ name = "the day after tomorrow"
|
||||
, pattern =
|
||||
[ regex "poim(a|â)ine"
|
||||
]
|
||||
, prod = \_ -> tt $ cycleNth TG.Day 2
|
||||
}
|
||||
|
||||
ruleAcum :: Rule
|
||||
ruleAcum = Rule
|
||||
{ name = "acum"
|
||||
@ -1332,6 +1340,7 @@ rules =
|
||||
, ruleYearLatent
|
||||
, ruleYearLatent2
|
||||
, ruleYyyymmdd
|
||||
, ruleTheDayAfterTomorrow
|
||||
]
|
||||
++ ruleDaysOfWeek
|
||||
++ ruleMonths
|
||||
|
Loading…
Reference in New Issue
Block a user