mirror of
https://github.com/facebook/duckling.git
synced 2024-11-28 08:34:46 +03:00
0e3d0604a2
Summary: Initialise Volume for CA (Catalan) language Reviewed By: stroxler Differential Revision: D28298901 Pulled By: chessai fbshipit-source-id: 72fd95062393b8b780e521b56b097b66e2263aef
52 lines
1.5 KiB
Haskell
52 lines
1.5 KiB
Haskell
-- 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.
|
|
|
|
|
|
{-# LANGUAGE GADTs #-}
|
|
|
|
|
|
module Duckling.Rules.CA
|
|
( defaultRules
|
|
, langRules
|
|
, localeRules
|
|
) where
|
|
|
|
|
|
import Duckling.Dimensions.Types
|
|
import Duckling.Locale
|
|
import qualified Duckling.AmountOfMoney.CA.Rules as AmountOfMoney
|
|
import qualified Duckling.Distance.CA.Rules as Distance
|
|
import qualified Duckling.Numeral.CA.Rules as Numeral
|
|
import qualified Duckling.Ordinal.CA.Rules as Ordinal
|
|
import qualified Duckling.Temperature.CA.Rules as Temperature
|
|
import qualified Duckling.Volume.CA.Rules as Volume
|
|
import Duckling.Types
|
|
|
|
defaultRules :: Seal Dimension -> [Rule]
|
|
defaultRules = langRules
|
|
|
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
|
localeRules _ _ = []
|
|
|
|
langRules :: Seal Dimension -> [Rule]
|
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
|
langRules (Seal CreditCardNumber) = []
|
|
langRules (Seal Distance) = Distance.rules
|
|
langRules (Seal Duration) = []
|
|
langRules (Seal Email) = []
|
|
langRules (Seal Numeral) = Numeral.rules
|
|
langRules (Seal Ordinal) = Ordinal.rules
|
|
langRules (Seal PhoneNumber) = []
|
|
langRules (Seal Quantity) = []
|
|
langRules (Seal RegexMatch) = []
|
|
langRules (Seal Temperature) = Temperature.rules
|
|
langRules (Seal Time) = []
|
|
langRules (Seal TimeGrain) = []
|
|
langRules (Seal Url) = []
|
|
langRules (Seal Volume) = Volume.rules
|
|
langRules (Seal (CustomDimension _)) = []
|