2017-12-20 00:05:23 +03:00
|
|
|
--Copyright (c) 2016-present, Facebook, Inc.
|
|
|
|
-- All rights reserved.
|
|
|
|
--
|
|
|
|
-- This source code is licensed under the BSD-style license found in the
|
|
|
|
-- LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
-- of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
|
|
|
|
|
|
{-# LANGUAGE GADTs #-}
|
|
|
|
|
|
|
|
module Duckling.Rules.HI
|
|
|
|
( defaultRules
|
|
|
|
, langRules
|
|
|
|
, localeRules
|
|
|
|
) where
|
|
|
|
|
|
|
|
import Duckling.Dimensions.Types
|
|
|
|
import Duckling.Locale
|
|
|
|
import Duckling.Types
|
|
|
|
import qualified Duckling.Numeral.HI.Rules as Numeral
|
2018-02-10 00:15:03 +03:00
|
|
|
import qualified Duckling.Ordinal.HI.Rules as Ordinal
|
2018-05-18 00:34:54 +03:00
|
|
|
import qualified Duckling.Duration.HI.Rules as Duration
|
2018-05-22 22:13:04 +03:00
|
|
|
import qualified Duckling.TimeGrain.HI.Rules as TimeGrain
|
2018-06-14 02:51:23 +03:00
|
|
|
import qualified Duckling.Temperature.HI.Rules as Temperature
|
2017-12-20 00:05:23 +03:00
|
|
|
|
|
|
|
defaultRules :: Some Dimension -> [Rule]
|
|
|
|
defaultRules = langRules
|
|
|
|
|
|
|
|
localeRules :: Region -> Some Dimension -> [Rule]
|
2018-04-20 01:21:18 +03:00
|
|
|
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
2017-12-20 00:05:23 +03:00
|
|
|
localeRules _ _ = []
|
|
|
|
|
|
|
|
langRules :: Some Dimension -> [Rule]
|
|
|
|
langRules (This AmountOfMoney) = []
|
|
|
|
langRules (This Distance) = []
|
2018-05-18 00:34:54 +03:00
|
|
|
langRules (This Duration) = Duration.rules
|
2017-12-20 00:05:23 +03:00
|
|
|
langRules (This Numeral) = Numeral.rules
|
|
|
|
langRules (This Email) = []
|
2018-02-10 00:15:03 +03:00
|
|
|
langRules (This Ordinal) = Ordinal.rules
|
2017-12-20 00:05:23 +03:00
|
|
|
langRules (This PhoneNumber) = []
|
|
|
|
langRules (This Quantity) = []
|
|
|
|
langRules (This RegexMatch) = []
|
2018-06-14 02:51:23 +03:00
|
|
|
langRules (This Temperature) = Temperature.rules
|
2017-12-20 00:05:23 +03:00
|
|
|
langRules (This Time) = []
|
2018-05-22 22:13:04 +03:00
|
|
|
langRules (This TimeGrain) = TimeGrain.rules
|
2017-12-20 00:05:23 +03:00
|
|
|
langRules (This Url) = []
|
|
|
|
langRules (This Volume) = []
|
2018-04-20 01:21:18 +03:00
|
|
|
langRules (This (CustomDimension dim)) = dimLangRules HI dim
|