mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/520 Reviewed By: patapizza Differential Revision: D25072459 Pulled By: chessai fbshipit-source-id: 5db72eda36fe166a452b2345cab75fb1508b192b
46 lines
1.2 KiB
Haskell
46 lines
1.2 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.FA
|
|
( defaultRules
|
|
, langRules
|
|
, localeRules
|
|
) where
|
|
|
|
import Duckling.Dimensions.Types
|
|
import Duckling.Locale
|
|
import Duckling.Types
|
|
import qualified Duckling.Numeral.FA.Rules as Numeral
|
|
|
|
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) = []
|
|
langRules (Seal CreditCardNumber) = []
|
|
langRules (Seal Distance) = []
|
|
langRules (Seal Duration) = []
|
|
langRules (Seal Email) = []
|
|
langRules (Seal Numeral) = Numeral.rules
|
|
langRules (Seal Ordinal) = []
|
|
langRules (Seal PhoneNumber) = []
|
|
langRules (Seal Quantity) = []
|
|
langRules (Seal RegexMatch) = []
|
|
langRules (Seal Temperature) = []
|
|
langRules (Seal Time) = []
|
|
langRules (Seal TimeGrain) = []
|
|
langRules (Seal Url) = []
|
|
langRules (Seal Volume) = []
|
|
langRules (Seal (CustomDimension dim)) = dimLangRules FA dim
|