mirror of
https://github.com/facebook/duckling.git
synced 2025-01-07 06:19:10 +03:00
Remove dependency on Data.Some (#533)
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/533 In recent versions of Data.Some the name of the constructor, `This` has changed name to `Some`. This has become rather problematic for us to migrate so we're just going to remove the dependency. The meat of this diff is adding the type `Seal` to `Duckling.Types`. That type replaces `Some`. Reviewed By: pepeiborra Differential Revision: D23929459 fbshipit-source-id: 8ff4146ecba4f1119a17899961b2d877547f6e4f
This commit is contained in:
parent
7ba9ea8aeb
commit
7889f396f3
@ -35,22 +35,22 @@ import Duckling.Rules
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
|
|
||||||
-- | Parses `input` and returns a curated list of entities found.
|
-- | Parses `input` and returns a curated list of entities found.
|
||||||
parse :: Text -> Context -> Options -> [Some Dimension] -> [Entity]
|
parse :: Text -> Context -> Options -> [Seal Dimension] -> [Entity]
|
||||||
parse input ctx options = map (formatToken input) . analyze input ctx options .
|
parse input ctx options = map (formatToken input) . analyze input ctx options .
|
||||||
HashSet.fromList
|
HashSet.fromList
|
||||||
|
|
||||||
supportedDimensions :: HashMap Lang [Some Dimension]
|
supportedDimensions :: HashMap Lang [Seal Dimension]
|
||||||
supportedDimensions =
|
supportedDimensions =
|
||||||
HashMap.fromList [ (l, allDimensions l) | l <- [minBound..maxBound] ]
|
HashMap.fromList [ (l, allDimensions l) | l <- [minBound..maxBound] ]
|
||||||
|
|
||||||
-- | Returns a curated list of resolved tokens found
|
-- | Returns a curated list of resolved tokens found
|
||||||
-- When `targets` is non-empty, returns only tokens of such dimensions.
|
-- When `targets` is non-empty, returns only tokens of such dimensions.
|
||||||
analyze :: Text -> Context -> Options -> HashSet (Some Dimension)
|
analyze :: Text -> Context -> Options -> HashSet (Seal Dimension)
|
||||||
-> [ResolvedToken]
|
-> [ResolvedToken]
|
||||||
analyze input context@Context{..} options targets =
|
analyze input context@Context{..} options targets =
|
||||||
rank (classifiers locale) targets
|
rank (classifiers locale) targets
|
||||||
. filter (\Resolved{node = Node{token = (Token d _)}} ->
|
. filter (\Resolved{node = Node{token = (Token d _)}} ->
|
||||||
HashSet.null targets || HashSet.member (This d) targets
|
HashSet.null targets || HashSet.member (Seal d) targets
|
||||||
)
|
)
|
||||||
$ parseAndResolve (rulesFor locale targets) input context options
|
$ parseAndResolve (rulesFor locale targets) input context options
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ module Duckling.Core
|
|||||||
, Range(..)
|
, Range(..)
|
||||||
, Region(..)
|
, Region(..)
|
||||||
, ResolvedVal(..)
|
, ResolvedVal(..)
|
||||||
, Some(..)
|
, Seal(..)
|
||||||
|
, withSeal
|
||||||
, fromName
|
, fromName
|
||||||
, makeLocale
|
, makeLocale
|
||||||
, toJText
|
, toJText
|
||||||
|
@ -36,20 +36,20 @@ import Duckling.Types
|
|||||||
-- -----------------------------------------------------------------
|
-- -----------------------------------------------------------------
|
||||||
-- API
|
-- API
|
||||||
|
|
||||||
debug :: Locale -> Text -> [Some Dimension] -> IO [Entity]
|
debug :: Locale -> Text -> [Seal Dimension] -> IO [Entity]
|
||||||
debug locale = debugCustom testContext {locale = locale} testOptions
|
debug locale = debugCustom testContext {locale = locale} testOptions
|
||||||
|
|
||||||
allParses :: Locale -> Text -> [Some Dimension] -> IO [Entity]
|
allParses :: Locale -> Text -> [Seal Dimension] -> IO [Entity]
|
||||||
allParses l sentence targets = debugTokens sentence $ parses l sentence targets
|
allParses l sentence targets = debugTokens sentence $ parses l sentence targets
|
||||||
|
|
||||||
fullParses :: Locale -> Text -> [Some Dimension] -> IO [Entity]
|
fullParses :: Locale -> Text -> [Seal Dimension] -> IO [Entity]
|
||||||
fullParses l sentence targets = debugTokens sentence .
|
fullParses l sentence targets = debugTokens sentence .
|
||||||
filter (\Resolved{range = Range start end} -> start == 0 && end == n) $
|
filter (\Resolved{range = Range start end} -> start == 0 && end == n) $
|
||||||
parses l sentence targets
|
parses l sentence targets
|
||||||
where
|
where
|
||||||
n = Text.length sentence
|
n = Text.length sentence
|
||||||
|
|
||||||
debugCustom :: Context -> Options -> Text -> [Some Dimension] -> IO [Entity]
|
debugCustom :: Context -> Options -> Text -> [Seal Dimension] -> IO [Entity]
|
||||||
debugCustom context options sentence targets = debugTokens sentence .
|
debugCustom context options sentence targets = debugTokens sentence .
|
||||||
analyze sentence context options $ HashSet.fromList targets
|
analyze sentence context options $ HashSet.fromList targets
|
||||||
|
|
||||||
@ -59,12 +59,12 @@ ptree sentence Entity {enode} = pnode sentence 0 enode
|
|||||||
-- -----------------------------------------------------------------
|
-- -----------------------------------------------------------------
|
||||||
-- Internals
|
-- Internals
|
||||||
|
|
||||||
parses :: Locale -> Text -> [Some Dimension] -> [ResolvedToken]
|
parses :: Locale -> Text -> [Seal Dimension] -> [ResolvedToken]
|
||||||
parses l sentence targets = flip filter tokens $
|
parses l sentence targets = flip filter tokens $
|
||||||
\Resolved{node = Node{token = (Token d _)}} ->
|
\Resolved{node = Node{token = (Token d _)}} ->
|
||||||
case targets of
|
case targets of
|
||||||
[] -> True
|
[] -> True
|
||||||
_ -> elem (This d) targets
|
_ -> elem (Seal d) targets
|
||||||
where
|
where
|
||||||
tokens = parseAndResolve rules sentence testContext {locale = l} testOptions
|
tokens = parseAndResolve rules sentence testContext {locale = l} testOptions
|
||||||
rules = rulesFor l $ HashSet.fromList targets
|
rules = rulesFor l $ HashSet.fromList targets
|
||||||
|
@ -69,36 +69,36 @@ import qualified Duckling.Dimensions.VI as VIDimensions
|
|||||||
import qualified Duckling.Dimensions.ZH as ZHDimensions
|
import qualified Duckling.Dimensions.ZH as ZHDimensions
|
||||||
|
|
||||||
|
|
||||||
allDimensions :: Lang -> [Some Dimension]
|
allDimensions :: Lang -> [Seal Dimension]
|
||||||
allDimensions lang = CommonDimensions.allDimensions ++ langDimensions lang
|
allDimensions lang = CommonDimensions.allDimensions ++ langDimensions lang
|
||||||
|
|
||||||
-- | Augments `targets` with all dependent dimensions.
|
-- | Augments `targets` with all dependent dimensions.
|
||||||
explicitDimensions :: HashSet (Some Dimension) -> HashSet (Some Dimension)
|
explicitDimensions :: HashSet (Seal Dimension) -> HashSet (Seal Dimension)
|
||||||
explicitDimensions targets = HashSet.union targets deps
|
explicitDimensions targets = HashSet.union targets deps
|
||||||
where
|
where
|
||||||
deps = HashSet.unions . map dependents $ HashSet.toList targets
|
deps = HashSet.unions . map dependents $ HashSet.toList targets
|
||||||
|
|
||||||
-- | Ordinal depends on Numeral for JA, KO, and ZH.
|
-- | Ordinal depends on Numeral for JA, KO, and ZH.
|
||||||
dependents :: Some Dimension -> HashSet (Some Dimension)
|
dependents :: Seal Dimension -> HashSet (Seal Dimension)
|
||||||
dependents (This CreditCardNumber) = HashSet.empty
|
dependents (Seal CreditCardNumber) = HashSet.empty
|
||||||
dependents (This Distance) = HashSet.singleton (This Numeral)
|
dependents (Seal Distance) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This Duration) = HashSet.fromList [This Numeral, This TimeGrain]
|
dependents (Seal Duration) = HashSet.fromList [Seal Numeral, Seal TimeGrain]
|
||||||
dependents (This Numeral) = HashSet.empty
|
dependents (Seal Numeral) = HashSet.empty
|
||||||
dependents (This Email) = HashSet.empty
|
dependents (Seal Email) = HashSet.empty
|
||||||
dependents (This AmountOfMoney) = HashSet.singleton (This Numeral)
|
dependents (Seal AmountOfMoney) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This Ordinal) = HashSet.singleton (This Numeral)
|
dependents (Seal Ordinal) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This PhoneNumber) = HashSet.empty
|
dependents (Seal PhoneNumber) = HashSet.empty
|
||||||
dependents (This Quantity) = HashSet.singleton (This Numeral)
|
dependents (Seal Quantity) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This RegexMatch) = HashSet.empty
|
dependents (Seal RegexMatch) = HashSet.empty
|
||||||
dependents (This Temperature) = HashSet.singleton (This Numeral)
|
dependents (Seal Temperature) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This Time) =
|
dependents (Seal Time) =
|
||||||
HashSet.fromList [This Numeral, This Duration, This Ordinal, This TimeGrain]
|
HashSet.fromList [Seal Numeral, Seal Duration, Seal Ordinal, Seal TimeGrain]
|
||||||
dependents (This TimeGrain) = HashSet.empty
|
dependents (Seal TimeGrain) = HashSet.empty
|
||||||
dependents (This Url) = HashSet.empty
|
dependents (Seal Url) = HashSet.empty
|
||||||
dependents (This Volume) = HashSet.singleton (This Numeral)
|
dependents (Seal Volume) = HashSet.singleton (Seal Numeral)
|
||||||
dependents (This (CustomDimension dim)) = dimDependents dim
|
dependents (Seal (CustomDimension dim)) = dimDependents dim
|
||||||
|
|
||||||
langDimensions :: Lang -> [Some Dimension]
|
langDimensions :: Lang -> [Seal Dimension]
|
||||||
langDimensions AF = AFDimensions.allDimensions
|
langDimensions AF = AFDimensions.allDimensions
|
||||||
langDimensions AR = ARDimensions.allDimensions
|
langDimensions AR = ARDimensions.allDimensions
|
||||||
langDimensions BG = BGDimensions.allDimensions
|
langDimensions BG = BGDimensions.allDimensions
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.AF
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.AR
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.BG
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.BN
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.CS
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.Common
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This AmountOfMoney
|
[ Seal AmountOfMoney
|
||||||
, This Email
|
, Seal Email
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This PhoneNumber
|
, Seal PhoneNumber
|
||||||
, This Url
|
, Seal Url
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.DA
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.DE
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.EL
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.EN
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.ES
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ET
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
]
|
]
|
||||||
|
@ -10,7 +10,7 @@ module Duckling.Dimensions.FI
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.FR
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.GA
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HE
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HI
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.HR
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HU
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ID
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.IS
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.IT
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.JA
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.KA
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.KM
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.KN
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.KO
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.LO
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ML
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral,
|
[ Seal Numeral,
|
||||||
This Ordinal
|
Seal Ordinal
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.MN
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.MY
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.NB
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.NE
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.NL
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.PL
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.PT
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.RO
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.RU
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -12,7 +12,7 @@ module Duckling.Dimensions.SK
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.SV
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.SW
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.TA
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
]
|
]
|
||||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.TH
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Numeral
|
[ Seal Numeral
|
||||||
]
|
]
|
||||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.TR
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Volume
|
, Seal Volume
|
||||||
]
|
]
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
module Duckling.Dimensions.Types
|
module Duckling.Dimensions.Types
|
||||||
( Some(..)
|
( Seal(..)
|
||||||
, Dimension(..)
|
, Dimension(..)
|
||||||
|
|
||||||
, fromName
|
, fromName
|
||||||
@ -18,7 +18,6 @@ module Duckling.Dimensions.Types
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.Some
|
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Prelude
|
import Prelude
|
||||||
import qualified Data.HashMap.Strict as HashMap
|
import qualified Data.HashMap.Strict as HashMap
|
||||||
@ -44,22 +43,22 @@ toName Url = "url"
|
|||||||
toName Volume = "volume"
|
toName Volume = "volume"
|
||||||
toName (CustomDimension dim) = Text.pack (show dim)
|
toName (CustomDimension dim) = Text.pack (show dim)
|
||||||
|
|
||||||
fromName :: Text -> Maybe (Some Dimension)
|
fromName :: Text -> Maybe (Seal Dimension)
|
||||||
fromName name = HashMap.lookup name m
|
fromName name = HashMap.lookup name m
|
||||||
where
|
where
|
||||||
m = HashMap.fromList
|
m = HashMap.fromList
|
||||||
[ ("amount-of-money", This AmountOfMoney)
|
[ ("amount-of-money", Seal AmountOfMoney)
|
||||||
, ("credit-card-number", This CreditCardNumber)
|
, ("credit-card-number", Seal CreditCardNumber)
|
||||||
, ("distance", This Distance)
|
, ("distance", Seal Distance)
|
||||||
, ("duration", This Duration)
|
, ("duration", Seal Duration)
|
||||||
, ("email", This Email)
|
, ("email", Seal Email)
|
||||||
, ("number", This Numeral)
|
, ("number", Seal Numeral)
|
||||||
, ("ordinal", This Ordinal)
|
, ("ordinal", Seal Ordinal)
|
||||||
, ("phone-number", This PhoneNumber)
|
, ("phone-number", Seal PhoneNumber)
|
||||||
, ("quantity", This Quantity)
|
, ("quantity", Seal Quantity)
|
||||||
, ("temperature", This Temperature)
|
, ("temperature", Seal Temperature)
|
||||||
, ("time", This Time)
|
, ("time", Seal Time)
|
||||||
, ("time-grain", This TimeGrain)
|
, ("time-grain", Seal TimeGrain)
|
||||||
, ("url", This Url)
|
, ("url", Seal Url)
|
||||||
, ("volume", This Volume)
|
, ("volume", Seal Volume)
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.UK
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.VI
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Duration
|
[ Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.ZH
|
|||||||
|
|
||||||
import Duckling.Dimensions.Types
|
import Duckling.Dimensions.Types
|
||||||
|
|
||||||
allDimensions :: [Some Dimension]
|
allDimensions :: [Seal Dimension]
|
||||||
allDimensions =
|
allDimensions =
|
||||||
[ This Distance
|
[ Seal Distance
|
||||||
, This Duration
|
, Seal Duration
|
||||||
, This Numeral
|
, Seal Numeral
|
||||||
, This Ordinal
|
, Seal Ordinal
|
||||||
, This Quantity
|
, Seal Quantity
|
||||||
, This Temperature
|
, Seal Temperature
|
||||||
, This Time
|
, Seal Time
|
||||||
]
|
]
|
||||||
|
@ -53,7 +53,7 @@ winners xs = filter (\x -> all ((/=) LT . compare x) xs) xs
|
|||||||
-- | Return a curated list of tokens
|
-- | Return a curated list of tokens
|
||||||
rank
|
rank
|
||||||
:: Classifiers
|
:: Classifiers
|
||||||
-> HashSet (Some Dimension)
|
-> HashSet (Seal Dimension)
|
||||||
-> [ResolvedToken]
|
-> [ResolvedToken]
|
||||||
-> [ResolvedToken]
|
-> [ResolvedToken]
|
||||||
rank classifiers targets tokens =
|
rank classifiers targets tokens =
|
||||||
@ -64,4 +64,4 @@ rank classifiers targets tokens =
|
|||||||
where
|
where
|
||||||
makeCandidate :: ResolvedToken -> Candidate
|
makeCandidate :: ResolvedToken -> Candidate
|
||||||
makeCandidate token@Resolved {node = n@Node {token = Token d _}} =
|
makeCandidate token@Resolved {node = n@Node {token = Token d _}} =
|
||||||
Candidate token (score classifiers n) $ HashSet.member (This d) targets
|
Candidate token (score classifiers n) $ HashSet.member (Seal d) targets
|
||||||
|
@ -70,7 +70,7 @@ import qualified Duckling.Rules.VI as VIRules
|
|||||||
import qualified Duckling.Rules.ZH as ZHRules
|
import qualified Duckling.Rules.ZH as ZHRules
|
||||||
|
|
||||||
-- | Returns the minimal set of rules required for `targets`.
|
-- | Returns the minimal set of rules required for `targets`.
|
||||||
rulesFor :: Locale -> HashSet (Some Dimension) -> [Rule]
|
rulesFor :: Locale -> HashSet (Seal Dimension) -> [Rule]
|
||||||
rulesFor locale targets
|
rulesFor locale targets
|
||||||
| HashSet.null targets = allRules locale
|
| HashSet.null targets = allRules locale
|
||||||
| otherwise = [ rules | dims <- HashSet.toList $ explicitDimensions targets
|
| otherwise = [ rules | dims <- HashSet.toList $ explicitDimensions targets
|
||||||
@ -82,14 +82,14 @@ allRules :: Locale -> [Rule]
|
|||||||
allRules locale@(Locale lang _) = concatMap (rulesFor' locale) . HashSet.toList
|
allRules locale@(Locale lang _) = concatMap (rulesFor' locale) . HashSet.toList
|
||||||
. explicitDimensions . HashSet.fromList $ allDimensions lang
|
. explicitDimensions . HashSet.fromList $ allDimensions lang
|
||||||
|
|
||||||
rulesFor' :: Locale -> Some Dimension -> [Rule]
|
rulesFor' :: Locale -> Seal Dimension -> [Rule]
|
||||||
rulesFor' (Locale lang (Just region)) dim =
|
rulesFor' (Locale lang (Just region)) dim =
|
||||||
CommonRules.rules dim ++ langRules lang dim ++ localeRules lang region dim
|
CommonRules.rules dim ++ langRules lang dim ++ localeRules lang region dim
|
||||||
rulesFor' (Locale lang Nothing) dim =
|
rulesFor' (Locale lang Nothing) dim =
|
||||||
CommonRules.rules dim ++ defaultRules lang dim
|
CommonRules.rules dim ++ defaultRules lang dim
|
||||||
|
|
||||||
-- | Default rules when no locale, for backward compatibility.
|
-- | Default rules when no locale, for backward compatibility.
|
||||||
defaultRules :: Lang -> Some Dimension -> [Rule]
|
defaultRules :: Lang -> Seal Dimension -> [Rule]
|
||||||
defaultRules AF = AFRules.defaultRules
|
defaultRules AF = AFRules.defaultRules
|
||||||
defaultRules AR = ARRules.defaultRules
|
defaultRules AR = ARRules.defaultRules
|
||||||
defaultRules BG = BGRules.defaultRules
|
defaultRules BG = BGRules.defaultRules
|
||||||
@ -137,7 +137,7 @@ defaultRules UK = UKRules.defaultRules
|
|||||||
defaultRules VI = VIRules.defaultRules
|
defaultRules VI = VIRules.defaultRules
|
||||||
defaultRules ZH = ZHRules.defaultRules
|
defaultRules ZH = ZHRules.defaultRules
|
||||||
|
|
||||||
localeRules :: Lang -> Region -> Some Dimension -> [Rule]
|
localeRules :: Lang -> Region -> Seal Dimension -> [Rule]
|
||||||
localeRules AF = AFRules.localeRules
|
localeRules AF = AFRules.localeRules
|
||||||
localeRules AR = ARRules.localeRules
|
localeRules AR = ARRules.localeRules
|
||||||
localeRules BG = BGRules.localeRules
|
localeRules BG = BGRules.localeRules
|
||||||
@ -185,7 +185,7 @@ localeRules UK = UKRules.localeRules
|
|||||||
localeRules VI = VIRules.localeRules
|
localeRules VI = VIRules.localeRules
|
||||||
localeRules ZH = ZHRules.localeRules
|
localeRules ZH = ZHRules.localeRules
|
||||||
|
|
||||||
langRules :: Lang -> Some Dimension -> [Rule]
|
langRules :: Lang -> Seal Dimension -> [Rule]
|
||||||
langRules AF = AFRules.langRules
|
langRules AF = AFRules.langRules
|
||||||
langRules AR = ARRules.langRules
|
langRules AR = ARRules.langRules
|
||||||
langRules BG = BGRules.langRules
|
langRules BG = BGRules.langRules
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.AF.Rules as Numeral
|
import qualified Duckling.Numeral.AF.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules AF dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules AF dim
|
||||||
|
@ -28,27 +28,27 @@ import qualified Duckling.Time.AR.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.AR.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.AR.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.AR.Rules as Volume
|
import qualified Duckling.Volume.AR.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = PhoneNumber.rules
|
langRules (Seal PhoneNumber) = PhoneNumber.rules
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules AR dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules AR dim
|
||||||
|
@ -25,27 +25,27 @@ import qualified Duckling.Time.BG.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.BG.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.BG.Rules as TimeGrain
|
||||||
import qualified Duckling.Ordinal.BG.Rules as Ordinal
|
import qualified Duckling.Ordinal.BG.Rules as Ordinal
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules BG dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules BG dim
|
||||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.BN.Rules as Numeral
|
import qualified Duckling.Numeral.BN.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules BN dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules BN dim
|
||||||
|
@ -20,27 +20,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Distance.CS.Rules as Distance
|
import qualified Duckling.Distance.CS.Rules as Distance
|
||||||
import qualified Duckling.Numeral.CS.Rules as Numeral
|
import qualified Duckling.Numeral.CS.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules CS dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules CS dim
|
||||||
|
@ -25,20 +25,20 @@ import qualified Duckling.Temperature.Rules as Temperature
|
|||||||
import qualified Duckling.Url.Rules as Url
|
import qualified Duckling.Url.Rules as Url
|
||||||
import qualified Duckling.Volume.Rules as Volume
|
import qualified Duckling.Volume.Rules as Volume
|
||||||
|
|
||||||
rules :: Some Dimension -> [Rule]
|
rules :: Seal Dimension -> [Rule]
|
||||||
rules (This AmountOfMoney) = AmountOfMoney.rules
|
rules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
rules (This CreditCardNumber) = CreditCardNumber.rules
|
rules (Seal CreditCardNumber) = CreditCardNumber.rules
|
||||||
rules (This Distance) = Distance.rules
|
rules (Seal Distance) = Distance.rules
|
||||||
rules (This Duration) = Duration.rules
|
rules (Seal Duration) = Duration.rules
|
||||||
rules (This Email) = Email.rules
|
rules (Seal Email) = Email.rules
|
||||||
rules (This Numeral) = Numeral.rules
|
rules (Seal Numeral) = Numeral.rules
|
||||||
rules (This Ordinal) = []
|
rules (Seal Ordinal) = []
|
||||||
rules (This PhoneNumber) = PhoneNumber.rules
|
rules (Seal PhoneNumber) = PhoneNumber.rules
|
||||||
rules (This Quantity) = []
|
rules (Seal Quantity) = []
|
||||||
rules (This RegexMatch) = []
|
rules (Seal RegexMatch) = []
|
||||||
rules (This Temperature) = Temperature.rules
|
rules (Seal Temperature) = Temperature.rules
|
||||||
rules (This Time) = []
|
rules (Seal Time) = []
|
||||||
rules (This TimeGrain) = []
|
rules (Seal TimeGrain) = []
|
||||||
rules (This Url) = Url.rules
|
rules (Seal Url) = Url.rules
|
||||||
rules (This Volume) = Volume.rules
|
rules (Seal Volume) = Volume.rules
|
||||||
rules (This (CustomDimension dim)) = dimRules dim
|
rules (Seal (CustomDimension dim)) = dimRules dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.DA.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.DA.Rules as Time
|
import qualified Duckling.Time.DA.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.DA.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.DA.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules DA dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules DA dim
|
||||||
|
@ -24,27 +24,27 @@ import qualified Duckling.TimeGrain.DE.Rules as TimeGrain
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Volume.DE.Rules as Volume
|
import qualified Duckling.Volume.DE.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = Email.rules
|
langRules (Seal Email) = Email.rules
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules DE dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules DE dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.EL.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.EL.Rules as Time
|
import qualified Duckling.Time.EL.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.EL.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.EL.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules EL dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules EL dim
|
||||||
|
@ -55,52 +55,52 @@ import qualified Duckling.Time.EN.ZA.Rules as TimeZA
|
|||||||
import qualified Duckling.TimeGrain.EN.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.EN.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.EN.Rules as Volume
|
import qualified Duckling.Volume.EN.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules dim@(This Time) = TimeUS.rulesBackwardCompatible ++ langRules dim
|
defaultRules dim@(Seal Time) = TimeUS.rulesBackwardCompatible ++ langRules dim
|
||||||
defaultRules dim = langRules dim
|
defaultRules dim = langRules dim
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules AU (This AmountOfMoney) = AmountOfMoneyAU.rules
|
localeRules AU (Seal AmountOfMoney) = AmountOfMoneyAU.rules
|
||||||
localeRules BZ (This AmountOfMoney) = AmountOfMoneyBZ.rules
|
localeRules BZ (Seal AmountOfMoney) = AmountOfMoneyBZ.rules
|
||||||
localeRules CA (This AmountOfMoney) = AmountOfMoneyCA.rules
|
localeRules CA (Seal AmountOfMoney) = AmountOfMoneyCA.rules
|
||||||
localeRules GB (This AmountOfMoney) = AmountOfMoneyGB.rules
|
localeRules GB (Seal AmountOfMoney) = AmountOfMoneyGB.rules
|
||||||
localeRules IE (This AmountOfMoney) = AmountOfMoneyIE.rules
|
localeRules IE (Seal AmountOfMoney) = AmountOfMoneyIE.rules
|
||||||
localeRules IN (This AmountOfMoney) = AmountOfMoneyIN.rules
|
localeRules IN (Seal AmountOfMoney) = AmountOfMoneyIN.rules
|
||||||
localeRules JM (This AmountOfMoney) = AmountOfMoneyJM.rules
|
localeRules JM (Seal AmountOfMoney) = AmountOfMoneyJM.rules
|
||||||
localeRules NZ (This AmountOfMoney) = AmountOfMoneyNZ.rules
|
localeRules NZ (Seal AmountOfMoney) = AmountOfMoneyNZ.rules
|
||||||
localeRules PH (This AmountOfMoney) = AmountOfMoneyPH.rules
|
localeRules PH (Seal AmountOfMoney) = AmountOfMoneyPH.rules
|
||||||
localeRules TT (This AmountOfMoney) = AmountOfMoneyTT.rules
|
localeRules TT (Seal AmountOfMoney) = AmountOfMoneyTT.rules
|
||||||
localeRules US (This AmountOfMoney) = AmountOfMoneyUS.rules
|
localeRules US (Seal AmountOfMoney) = AmountOfMoneyUS.rules
|
||||||
localeRules ZA (This AmountOfMoney) = AmountOfMoneyZA.rules
|
localeRules ZA (Seal AmountOfMoney) = AmountOfMoneyZA.rules
|
||||||
localeRules AU (This Time) = TimeAU.rules
|
localeRules AU (Seal Time) = TimeAU.rules
|
||||||
localeRules BZ (This Time) = TimeBZ.rules
|
localeRules BZ (Seal Time) = TimeBZ.rules
|
||||||
localeRules CA (This Time) = TimeCA.rules
|
localeRules CA (Seal Time) = TimeCA.rules
|
||||||
localeRules GB (This Time) = TimeGB.rules
|
localeRules GB (Seal Time) = TimeGB.rules
|
||||||
localeRules IE (This Time) = TimeIE.rules
|
localeRules IE (Seal Time) = TimeIE.rules
|
||||||
localeRules IN (This Time) = TimeIN.rules
|
localeRules IN (Seal Time) = TimeIN.rules
|
||||||
localeRules JM (This Time) = TimeJM.rules
|
localeRules JM (Seal Time) = TimeJM.rules
|
||||||
localeRules NZ (This Time) = TimeNZ.rules
|
localeRules NZ (Seal Time) = TimeNZ.rules
|
||||||
localeRules PH (This Time) = TimePH.rules
|
localeRules PH (Seal Time) = TimePH.rules
|
||||||
localeRules TT (This Time) = TimeTT.rules
|
localeRules TT (Seal Time) = TimeTT.rules
|
||||||
localeRules US (This Time) = TimeUS.rules
|
localeRules US (Seal Time) = TimeUS.rules
|
||||||
localeRules ZA (This Time) = TimeZA.rules
|
localeRules ZA (Seal Time) = TimeZA.rules
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = Email.rules
|
langRules (Seal Email) = Email.rules
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules EN dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules EN dim
|
||||||
|
@ -40,36 +40,36 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Volume.ES.Rules as Volume
|
import qualified Duckling.Volume.ES.Rules as Volume
|
||||||
import qualified Duckling.Duration.ES.Rules as Duration
|
import qualified Duckling.Duration.ES.Rules as Duration
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules dim@(This Numeral) =
|
defaultRules dim@(Seal Numeral) =
|
||||||
NumeralES.rulesBackwardCompatible ++ langRules dim
|
NumeralES.rulesBackwardCompatible ++ langRules dim
|
||||||
defaultRules dim = langRules dim
|
defaultRules dim = langRules dim
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules R.AR (This Numeral) = NumeralAR.rules
|
localeRules R.AR (Seal Numeral) = NumeralAR.rules
|
||||||
localeRules CL (This Numeral) = NumeralCL.rules
|
localeRules CL (Seal Numeral) = NumeralCL.rules
|
||||||
localeRules CO (This Numeral) = NumeralCO.rules
|
localeRules CO (Seal Numeral) = NumeralCO.rules
|
||||||
localeRules R.ES (This Numeral) = NumeralES.rules
|
localeRules R.ES (Seal Numeral) = NumeralES.rules
|
||||||
localeRules MX (This Numeral) = NumeralMX.rules
|
localeRules MX (Seal Numeral) = NumeralMX.rules
|
||||||
localeRules PE (This Numeral) = NumeralPE.rules
|
localeRules PE (Seal Numeral) = NumeralPE.rules
|
||||||
localeRules VE (This Numeral) = NumeralVE.rules
|
localeRules VE (Seal Numeral) = NumeralVE.rules
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules ES dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules ES dim
|
||||||
|
@ -20,27 +20,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Numeral.ET.Rules as Numeral
|
import qualified Duckling.Numeral.ET.Rules as Numeral
|
||||||
import qualified Duckling.Ordinal.ET.Rules as Ordinal
|
import qualified Duckling.Ordinal.ET.Rules as Ordinal
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules ET dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules ET dim
|
||||||
|
@ -18,27 +18,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Numeral.FI.Rules as Numeral
|
import qualified Duckling.Numeral.FI.Rules as Numeral
|
||||||
import qualified Duckling.TimeGrain.FI.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.FI.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules FI dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules FI dim
|
||||||
|
@ -29,27 +29,27 @@ import qualified Duckling.Time.FR.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.FR.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.FR.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.FR.Rules as Volume
|
import qualified Duckling.Volume.FR.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = Email.rules
|
langRules (Seal Email) = Email.rules
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules FR dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules FR dim
|
||||||
|
@ -27,27 +27,27 @@ import qualified Duckling.Time.GA.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.GA.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.GA.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.GA.Rules as Volume
|
import qualified Duckling.Volume.GA.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules GA dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules GA dim
|
||||||
|
@ -24,27 +24,27 @@ import qualified Duckling.Ordinal.HE.Rules as Ordinal
|
|||||||
import qualified Duckling.TimeGrain.HE.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.HE.Rules as TimeGrain
|
||||||
import qualified Duckling.Time.HE.Rules as Time
|
import qualified Duckling.Time.HE.Rules as Time
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules HE dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules HE dim
|
||||||
|
@ -22,27 +22,27 @@ import qualified Duckling.Duration.HI.Rules as Duration
|
|||||||
import qualified Duckling.TimeGrain.HI.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.HI.Rules as TimeGrain
|
||||||
import qualified Duckling.Temperature.HI.Rules as Temperature
|
import qualified Duckling.Temperature.HI.Rules as Temperature
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules HI dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules HI dim
|
||||||
|
@ -29,27 +29,27 @@ import qualified Duckling.TimeGrain.HR.Rules as TimeGrain
|
|||||||
import qualified Duckling.Volume.HR.Rules as Volume
|
import qualified Duckling.Volume.HR.Rules as Volume
|
||||||
|
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules HR dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules HR dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.HU.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.HU.Rules as Time
|
import qualified Duckling.Time.HU.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.HU.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.HU.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules HU dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules HU dim
|
||||||
|
@ -21,27 +21,27 @@ import qualified Duckling.AmountOfMoney.ID.Rules as AmountOfMoney
|
|||||||
import qualified Duckling.Numeral.ID.Rules as Numeral
|
import qualified Duckling.Numeral.ID.Rules as Numeral
|
||||||
import qualified Duckling.Ordinal.ID.Rules as Ordinal
|
import qualified Duckling.Ordinal.ID.Rules as Ordinal
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules ID dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules ID dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Email.IS.Rules as Email
|
import qualified Duckling.Email.IS.Rules as Email
|
||||||
import qualified Duckling.Numeral.IS.Rules as Numeral
|
import qualified Duckling.Numeral.IS.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = Email.rules
|
langRules (Seal Email) = Email.rules
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules IS dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules IS dim
|
||||||
|
@ -28,27 +28,27 @@ import qualified Duckling.Time.IT.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.IT.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.IT.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.IT.Rules as Volume
|
import qualified Duckling.Volume.IT.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = Email.rules
|
langRules (Seal Email) = Email.rules
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules IT dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules IT dim
|
||||||
|
@ -22,27 +22,27 @@ import qualified Duckling.Ordinal.JA.Rules as Ordinal
|
|||||||
import qualified Duckling.Temperature.JA.Rules as Temperature
|
import qualified Duckling.Temperature.JA.Rules as Temperature
|
||||||
import qualified Duckling.TimeGrain.JA.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.JA.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules JA dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules JA dim
|
||||||
|
@ -24,27 +24,27 @@ import qualified Duckling.TimeGrain.KA.Rules as TimeGrain
|
|||||||
import qualified Duckling.Ordinal.KA.Rules as Ordinal
|
import qualified Duckling.Ordinal.KA.Rules as Ordinal
|
||||||
import qualified Duckling.Duration.KA.Rules as Duration
|
import qualified Duckling.Duration.KA.Rules as Duration
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules KA dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules KA dim
|
||||||
|
@ -24,27 +24,27 @@ import qualified Duckling.Quantity.KM.Rules as Quantity
|
|||||||
import qualified Duckling.Temperature.KM.Rules as Temperature
|
import qualified Duckling.Temperature.KM.Rules as Temperature
|
||||||
import qualified Duckling.Volume.KM.Rules as Volume
|
import qualified Duckling.Volume.KM.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules KM dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules KM dim
|
||||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.KN.Rules as Numeral
|
import qualified Duckling.Numeral.KN.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules KN dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules KN dim
|
||||||
|
@ -28,27 +28,27 @@ import qualified Duckling.Time.KO.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.KO.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.KO.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.KO.Rules as Volume
|
import qualified Duckling.Volume.KO.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules KO dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules KO dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.LO.Rules as Numeral
|
import qualified Duckling.Numeral.LO.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules LO dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules LO dim
|
||||||
|
@ -20,27 +20,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Numeral.ML.Rules as Numeral
|
import qualified Duckling.Numeral.ML.Rules as Numeral
|
||||||
import qualified Duckling.Ordinal.ML.Rules as Ordinal
|
import qualified Duckling.Ordinal.ML.Rules as Ordinal
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules ML dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules ML dim
|
||||||
|
@ -27,27 +27,27 @@ import qualified Duckling.TimeGrain.MN.Rules as TimeGrain
|
|||||||
import qualified Duckling.Volume.MN.Rules as Volume
|
import qualified Duckling.Volume.MN.Rules as Volume
|
||||||
import qualified Duckling.Temperature.MN.Rules as Temperature
|
import qualified Duckling.Temperature.MN.Rules as Temperature
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules MN dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules MN dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.MY.Rules as Numeral
|
import qualified Duckling.Numeral.MY.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules MY dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules MY dim
|
||||||
|
@ -24,27 +24,27 @@ import qualified Duckling.Ordinal.NB.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.NB.Rules as Time
|
import qualified Duckling.Time.NB.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.NB.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.NB.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules NB dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules NB dim
|
||||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.NE.Rules as Numeral
|
import qualified Duckling.Numeral.NE.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules NE dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules NE dim
|
||||||
|
@ -30,29 +30,29 @@ import qualified Duckling.Time.NL.NL.Rules as TimeNL
|
|||||||
import qualified Duckling.TimeGrain.NL.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.NL.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.NL.Rules as Volume
|
import qualified Duckling.Volume.NL.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules dim@(This Time) = TimeNL.rulesBackwardCompatible ++ langRules dim
|
defaultRules dim@(Seal Time) = TimeNL.rulesBackwardCompatible ++ langRules dim
|
||||||
defaultRules dim = langRules dim
|
defaultRules dim = langRules dim
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules BE (This Time) = TimeBE.rules
|
localeRules BE (Seal Time) = TimeBE.rules
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules NL dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules NL dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.PL.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.PL.Rules as Time
|
import qualified Duckling.Time.PL.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.PL.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.PL.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules PL dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules PL dim
|
||||||
|
@ -28,27 +28,27 @@ import qualified Duckling.Time.PT.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.PT.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.PT.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.PT.Rules as Volume
|
import qualified Duckling.Volume.PT.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = PhoneNumber.rules
|
langRules (Seal PhoneNumber) = PhoneNumber.rules
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules PT dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules PT dim
|
||||||
|
@ -28,27 +28,27 @@ import qualified Duckling.Time.RO.Rules as Time
|
|||||||
import qualified Duckling.TimeGrain.RO.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.RO.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.RO.Rules as Volume
|
import qualified Duckling.Volume.RO.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules RO dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules RO dim
|
||||||
|
@ -26,27 +26,27 @@ import qualified Duckling.Quantity.RU.Rules as Quantity
|
|||||||
import qualified Duckling.TimeGrain.RU.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.RU.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.RU.Rules as Volume
|
import qualified Duckling.Volume.RU.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = Quantity.rules
|
langRules (Seal Quantity) = Quantity.rules
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules RU dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules RU dim
|
||||||
|
@ -20,27 +20,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.SK.Rules as Numeral
|
import qualified Duckling.Numeral.SK.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules SK dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules SK dim
|
||||||
|
@ -25,27 +25,27 @@ import qualified Duckling.Numeral.SV.Rules as Numeral
|
|||||||
import qualified Duckling.Time.SV.Rules as Time
|
import qualified Duckling.Time.SV.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.SV.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.SV.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules SV dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules SV dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.SW.Rules as Numeral
|
import qualified Duckling.Numeral.SW.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules SW dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules SW dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Types
|
|||||||
import qualified Duckling.Numeral.TA.Rules as Numeral
|
import qualified Duckling.Numeral.TA.Rules as Numeral
|
||||||
import qualified Duckling.Ordinal.TA.Rules as Ordinal
|
import qualified Duckling.Ordinal.TA.Rules as Ordinal
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules TA dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules TA dim
|
||||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
|||||||
import Duckling.Types
|
import Duckling.Types
|
||||||
import qualified Duckling.Numeral.TH.Rules as Numeral
|
import qualified Duckling.Numeral.TH.Rules as Numeral
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = []
|
langRules (Seal Ordinal) = []
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = []
|
langRules (Seal TimeGrain) = []
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules TH dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules TH dim
|
||||||
|
@ -25,27 +25,27 @@ import qualified Duckling.Temperature.TR.Rules as Temperature
|
|||||||
import qualified Duckling.TimeGrain.TR.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.TR.Rules as TimeGrain
|
||||||
import qualified Duckling.Volume.TR.Rules as Volume
|
import qualified Duckling.Volume.TR.Rules as Volume
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = Distance.rules
|
langRules (Seal Distance) = Distance.rules
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = Temperature.rules
|
langRules (Seal Temperature) = Temperature.rules
|
||||||
langRules (This Time) = []
|
langRules (Seal Time) = []
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = Volume.rules
|
langRules (Seal Volume) = Volume.rules
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules TR dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules TR dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.UK.Rules as Ordinal
|
|||||||
import qualified Duckling.Time.UK.Rules as Time
|
import qualified Duckling.Time.UK.Rules as Time
|
||||||
import qualified Duckling.TimeGrain.UK.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.UK.Rules as TimeGrain
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = []
|
langRules (Seal AmountOfMoney) = []
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = Duration.rules
|
langRules (Seal Duration) = Duration.rules
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules UK dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules UK dim
|
||||||
|
@ -23,27 +23,27 @@ import qualified Duckling.Ordinal.VI.Rules as Ordinal
|
|||||||
import qualified Duckling.TimeGrain.VI.Rules as TimeGrain
|
import qualified Duckling.TimeGrain.VI.Rules as TimeGrain
|
||||||
import qualified Duckling.Time.VI.Rules as Time
|
import qualified Duckling.Time.VI.Rules as Time
|
||||||
|
|
||||||
defaultRules :: Some Dimension -> [Rule]
|
defaultRules :: Seal Dimension -> [Rule]
|
||||||
defaultRules = langRules
|
defaultRules = langRules
|
||||||
|
|
||||||
localeRules :: Region -> Some Dimension -> [Rule]
|
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||||
localeRules _ _ = []
|
localeRules _ _ = []
|
||||||
|
|
||||||
langRules :: Some Dimension -> [Rule]
|
langRules :: Seal Dimension -> [Rule]
|
||||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||||
langRules (This CreditCardNumber) = []
|
langRules (Seal CreditCardNumber) = []
|
||||||
langRules (This Distance) = []
|
langRules (Seal Distance) = []
|
||||||
langRules (This Duration) = []
|
langRules (Seal Duration) = []
|
||||||
langRules (This Email) = []
|
langRules (Seal Email) = []
|
||||||
langRules (This Numeral) = Numeral.rules
|
langRules (Seal Numeral) = Numeral.rules
|
||||||
langRules (This Ordinal) = Ordinal.rules
|
langRules (Seal Ordinal) = Ordinal.rules
|
||||||
langRules (This PhoneNumber) = []
|
langRules (Seal PhoneNumber) = []
|
||||||
langRules (This Quantity) = []
|
langRules (Seal Quantity) = []
|
||||||
langRules (This RegexMatch) = []
|
langRules (Seal RegexMatch) = []
|
||||||
langRules (This Temperature) = []
|
langRules (Seal Temperature) = []
|
||||||
langRules (This Time) = Time.rules
|
langRules (Seal Time) = Time.rules
|
||||||
langRules (This TimeGrain) = TimeGrain.rules
|
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||||
langRules (This Url) = []
|
langRules (Seal Url) = []
|
||||||
langRules (This Volume) = []
|
langRules (Seal Volume) = []
|
||||||
langRules (This (CustomDimension dim)) = dimLangRules VI dim
|
langRules (Seal (CustomDimension dim)) = dimLangRules VI dim
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user