mirror of
https://github.com/facebook/duckling.git
synced 2025-01-05 11:55:41 +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
|
||||
|
||||
-- | 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 .
|
||||
HashSet.fromList
|
||||
|
||||
supportedDimensions :: HashMap Lang [Some Dimension]
|
||||
supportedDimensions :: HashMap Lang [Seal Dimension]
|
||||
supportedDimensions =
|
||||
HashMap.fromList [ (l, allDimensions l) | l <- [minBound..maxBound] ]
|
||||
|
||||
-- | Returns a curated list of resolved tokens found
|
||||
-- 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]
|
||||
analyze input context@Context{..} options targets =
|
||||
rank (classifiers locale) targets
|
||||
. 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
|
||||
|
||||
|
@ -20,7 +20,8 @@ module Duckling.Core
|
||||
, Range(..)
|
||||
, Region(..)
|
||||
, ResolvedVal(..)
|
||||
, Some(..)
|
||||
, Seal(..)
|
||||
, withSeal
|
||||
, fromName
|
||||
, makeLocale
|
||||
, toJText
|
||||
|
@ -36,20 +36,20 @@ import Duckling.Types
|
||||
-- -----------------------------------------------------------------
|
||||
-- API
|
||||
|
||||
debug :: Locale -> Text -> [Some Dimension] -> IO [Entity]
|
||||
debug :: Locale -> Text -> [Seal Dimension] -> IO [Entity]
|
||||
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
|
||||
|
||||
fullParses :: Locale -> Text -> [Some Dimension] -> IO [Entity]
|
||||
fullParses :: Locale -> Text -> [Seal Dimension] -> IO [Entity]
|
||||
fullParses l sentence targets = debugTokens sentence .
|
||||
filter (\Resolved{range = Range start end} -> start == 0 && end == n) $
|
||||
parses l sentence targets
|
||||
where
|
||||
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 .
|
||||
analyze sentence context options $ HashSet.fromList targets
|
||||
|
||||
@ -59,12 +59,12 @@ ptree sentence Entity {enode} = pnode sentence 0 enode
|
||||
-- -----------------------------------------------------------------
|
||||
-- Internals
|
||||
|
||||
parses :: Locale -> Text -> [Some Dimension] -> [ResolvedToken]
|
||||
parses :: Locale -> Text -> [Seal Dimension] -> [ResolvedToken]
|
||||
parses l sentence targets = flip filter tokens $
|
||||
\Resolved{node = Node{token = (Token d _)}} ->
|
||||
case targets of
|
||||
[] -> True
|
||||
_ -> elem (This d) targets
|
||||
_ -> elem (Seal d) targets
|
||||
where
|
||||
tokens = parseAndResolve rules sentence testContext {locale = l} testOptions
|
||||
rules = rulesFor l $ HashSet.fromList targets
|
||||
|
@ -69,36 +69,36 @@ import qualified Duckling.Dimensions.VI as VIDimensions
|
||||
import qualified Duckling.Dimensions.ZH as ZHDimensions
|
||||
|
||||
|
||||
allDimensions :: Lang -> [Some Dimension]
|
||||
allDimensions :: Lang -> [Seal Dimension]
|
||||
allDimensions lang = CommonDimensions.allDimensions ++ langDimensions lang
|
||||
|
||||
-- | 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
|
||||
where
|
||||
deps = HashSet.unions . map dependents $ HashSet.toList targets
|
||||
|
||||
-- | Ordinal depends on Numeral for JA, KO, and ZH.
|
||||
dependents :: Some Dimension -> HashSet (Some Dimension)
|
||||
dependents (This CreditCardNumber) = HashSet.empty
|
||||
dependents (This Distance) = HashSet.singleton (This Numeral)
|
||||
dependents (This Duration) = HashSet.fromList [This Numeral, This TimeGrain]
|
||||
dependents (This Numeral) = HashSet.empty
|
||||
dependents (This Email) = HashSet.empty
|
||||
dependents (This AmountOfMoney) = HashSet.singleton (This Numeral)
|
||||
dependents (This Ordinal) = HashSet.singleton (This Numeral)
|
||||
dependents (This PhoneNumber) = HashSet.empty
|
||||
dependents (This Quantity) = HashSet.singleton (This Numeral)
|
||||
dependents (This RegexMatch) = HashSet.empty
|
||||
dependents (This Temperature) = HashSet.singleton (This Numeral)
|
||||
dependents (This Time) =
|
||||
HashSet.fromList [This Numeral, This Duration, This Ordinal, This TimeGrain]
|
||||
dependents (This TimeGrain) = HashSet.empty
|
||||
dependents (This Url) = HashSet.empty
|
||||
dependents (This Volume) = HashSet.singleton (This Numeral)
|
||||
dependents (This (CustomDimension dim)) = dimDependents dim
|
||||
dependents :: Seal Dimension -> HashSet (Seal Dimension)
|
||||
dependents (Seal CreditCardNumber) = HashSet.empty
|
||||
dependents (Seal Distance) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal Duration) = HashSet.fromList [Seal Numeral, Seal TimeGrain]
|
||||
dependents (Seal Numeral) = HashSet.empty
|
||||
dependents (Seal Email) = HashSet.empty
|
||||
dependents (Seal AmountOfMoney) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal Ordinal) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal PhoneNumber) = HashSet.empty
|
||||
dependents (Seal Quantity) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal RegexMatch) = HashSet.empty
|
||||
dependents (Seal Temperature) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal Time) =
|
||||
HashSet.fromList [Seal Numeral, Seal Duration, Seal Ordinal, Seal TimeGrain]
|
||||
dependents (Seal TimeGrain) = HashSet.empty
|
||||
dependents (Seal Url) = HashSet.empty
|
||||
dependents (Seal Volume) = HashSet.singleton (Seal Numeral)
|
||||
dependents (Seal (CustomDimension dim)) = dimDependents dim
|
||||
|
||||
langDimensions :: Lang -> [Some Dimension]
|
||||
langDimensions :: Lang -> [Seal Dimension]
|
||||
langDimensions AF = AFDimensions.allDimensions
|
||||
langDimensions AR = ARDimensions.allDimensions
|
||||
langDimensions BG = BGDimensions.allDimensions
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.AF
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.AR
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.BG
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.BN
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.CS
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Numeral
|
||||
[ Seal Distance
|
||||
, Seal Numeral
|
||||
]
|
||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.Common
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This AmountOfMoney
|
||||
, This Email
|
||||
, This Numeral
|
||||
, This PhoneNumber
|
||||
, This Url
|
||||
[ Seal AmountOfMoney
|
||||
, Seal Email
|
||||
, Seal Numeral
|
||||
, Seal PhoneNumber
|
||||
, Seal Url
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.DA
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.DE
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.EL
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.EN
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.ES
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ET
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
, This Ordinal
|
||||
[ Seal Numeral
|
||||
, Seal Ordinal
|
||||
]
|
||||
|
@ -10,7 +10,7 @@ module Duckling.Dimensions.FI
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.FR
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.GA
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HE
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HI
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.HR
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.HU
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ID
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
, This Ordinal
|
||||
[ Seal Numeral
|
||||
, Seal Ordinal
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.IS
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.IT
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.JA
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.KA
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
, This Ordinal
|
||||
, This Duration
|
||||
, This Time
|
||||
[ Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Duration
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.KM
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.KN
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.KO
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.LO
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.ML
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral,
|
||||
This Ordinal
|
||||
[ Seal Numeral,
|
||||
Seal Ordinal
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.MN
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.MY
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.NB
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.NE
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.NL
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.PL
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.PT
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,14 +11,14 @@ module Duckling.Dimensions.RO
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.RU
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -12,7 +12,7 @@ module Duckling.Dimensions.SK
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,11 +11,11 @@ module Duckling.Dimensions.SV
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.SW
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,8 +11,8 @@ module Duckling.Dimensions.TA
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
, This Ordinal
|
||||
[ Seal Numeral
|
||||
, Seal Ordinal
|
||||
]
|
||||
|
@ -11,7 +11,7 @@ module Duckling.Dimensions.TH
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Numeral
|
||||
[ Seal Numeral
|
||||
]
|
||||
|
@ -11,12 +11,12 @@ module Duckling.Dimensions.TR
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Temperature
|
||||
, This Volume
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Temperature
|
||||
, Seal Volume
|
||||
]
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
module Duckling.Dimensions.Types
|
||||
( Some(..)
|
||||
( Seal(..)
|
||||
, Dimension(..)
|
||||
|
||||
, fromName
|
||||
@ -18,7 +18,6 @@ module Duckling.Dimensions.Types
|
||||
) where
|
||||
|
||||
import Data.Maybe
|
||||
import Data.Some
|
||||
import Data.Text (Text)
|
||||
import Prelude
|
||||
import qualified Data.HashMap.Strict as HashMap
|
||||
@ -44,22 +43,22 @@ toName Url = "url"
|
||||
toName Volume = "volume"
|
||||
toName (CustomDimension dim) = Text.pack (show dim)
|
||||
|
||||
fromName :: Text -> Maybe (Some Dimension)
|
||||
fromName :: Text -> Maybe (Seal Dimension)
|
||||
fromName name = HashMap.lookup name m
|
||||
where
|
||||
m = HashMap.fromList
|
||||
[ ("amount-of-money", This AmountOfMoney)
|
||||
, ("credit-card-number", This CreditCardNumber)
|
||||
, ("distance", This Distance)
|
||||
, ("duration", This Duration)
|
||||
, ("email", This Email)
|
||||
, ("number", This Numeral)
|
||||
, ("ordinal", This Ordinal)
|
||||
, ("phone-number", This PhoneNumber)
|
||||
, ("quantity", This Quantity)
|
||||
, ("temperature", This Temperature)
|
||||
, ("time", This Time)
|
||||
, ("time-grain", This TimeGrain)
|
||||
, ("url", This Url)
|
||||
, ("volume", This Volume)
|
||||
[ ("amount-of-money", Seal AmountOfMoney)
|
||||
, ("credit-card-number", Seal CreditCardNumber)
|
||||
, ("distance", Seal Distance)
|
||||
, ("duration", Seal Duration)
|
||||
, ("email", Seal Email)
|
||||
, ("number", Seal Numeral)
|
||||
, ("ordinal", Seal Ordinal)
|
||||
, ("phone-number", Seal PhoneNumber)
|
||||
, ("quantity", Seal Quantity)
|
||||
, ("temperature", Seal Temperature)
|
||||
, ("time", Seal Time)
|
||||
, ("time-grain", Seal TimeGrain)
|
||||
, ("url", Seal Url)
|
||||
, ("volume", Seal Volume)
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.UK
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,10 +11,10 @@ module Duckling.Dimensions.VI
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Time
|
||||
[ Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -11,13 +11,13 @@ module Duckling.Dimensions.ZH
|
||||
|
||||
import Duckling.Dimensions.Types
|
||||
|
||||
allDimensions :: [Some Dimension]
|
||||
allDimensions :: [Seal Dimension]
|
||||
allDimensions =
|
||||
[ This Distance
|
||||
, This Duration
|
||||
, This Numeral
|
||||
, This Ordinal
|
||||
, This Quantity
|
||||
, This Temperature
|
||||
, This Time
|
||||
[ Seal Distance
|
||||
, Seal Duration
|
||||
, Seal Numeral
|
||||
, Seal Ordinal
|
||||
, Seal Quantity
|
||||
, Seal Temperature
|
||||
, Seal Time
|
||||
]
|
||||
|
@ -53,7 +53,7 @@ winners xs = filter (\x -> all ((/=) LT . compare x) xs) xs
|
||||
-- | Return a curated list of tokens
|
||||
rank
|
||||
:: Classifiers
|
||||
-> HashSet (Some Dimension)
|
||||
-> HashSet (Seal Dimension)
|
||||
-> [ResolvedToken]
|
||||
-> [ResolvedToken]
|
||||
rank classifiers targets tokens =
|
||||
@ -64,4 +64,4 @@ rank classifiers targets tokens =
|
||||
where
|
||||
makeCandidate :: ResolvedToken -> Candidate
|
||||
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
|
||||
|
||||
-- | Returns the minimal set of rules required for `targets`.
|
||||
rulesFor :: Locale -> HashSet (Some Dimension) -> [Rule]
|
||||
rulesFor :: Locale -> HashSet (Seal Dimension) -> [Rule]
|
||||
rulesFor locale targets
|
||||
| HashSet.null targets = allRules locale
|
||||
| otherwise = [ rules | dims <- HashSet.toList $ explicitDimensions targets
|
||||
@ -82,14 +82,14 @@ allRules :: Locale -> [Rule]
|
||||
allRules locale@(Locale lang _) = concatMap (rulesFor' locale) . HashSet.toList
|
||||
. explicitDimensions . HashSet.fromList $ allDimensions lang
|
||||
|
||||
rulesFor' :: Locale -> Some Dimension -> [Rule]
|
||||
rulesFor' :: Locale -> Seal Dimension -> [Rule]
|
||||
rulesFor' (Locale lang (Just region)) dim =
|
||||
CommonRules.rules dim ++ langRules lang dim ++ localeRules lang region dim
|
||||
rulesFor' (Locale lang Nothing) dim =
|
||||
CommonRules.rules dim ++ defaultRules lang dim
|
||||
|
||||
-- | Default rules when no locale, for backward compatibility.
|
||||
defaultRules :: Lang -> Some Dimension -> [Rule]
|
||||
defaultRules :: Lang -> Seal Dimension -> [Rule]
|
||||
defaultRules AF = AFRules.defaultRules
|
||||
defaultRules AR = ARRules.defaultRules
|
||||
defaultRules BG = BGRules.defaultRules
|
||||
@ -137,7 +137,7 @@ defaultRules UK = UKRules.defaultRules
|
||||
defaultRules VI = VIRules.defaultRules
|
||||
defaultRules ZH = ZHRules.defaultRules
|
||||
|
||||
localeRules :: Lang -> Region -> Some Dimension -> [Rule]
|
||||
localeRules :: Lang -> Region -> Seal Dimension -> [Rule]
|
||||
localeRules AF = AFRules.localeRules
|
||||
localeRules AR = ARRules.localeRules
|
||||
localeRules BG = BGRules.localeRules
|
||||
@ -185,7 +185,7 @@ localeRules UK = UKRules.localeRules
|
||||
localeRules VI = VIRules.localeRules
|
||||
localeRules ZH = ZHRules.localeRules
|
||||
|
||||
langRules :: Lang -> Some Dimension -> [Rule]
|
||||
langRules :: Lang -> Seal Dimension -> [Rule]
|
||||
langRules AF = AFRules.langRules
|
||||
langRules AR = ARRules.langRules
|
||||
langRules BG = BGRules.langRules
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.AF.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules AF dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Volume.AR.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = PhoneNumber.rules
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules AR dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = PhoneNumber.rules
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Ordinal.BG.Rules as Ordinal
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules BG dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules BG dim
|
||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.BN.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules BN dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules BN dim
|
||||
|
@ -20,27 +20,27 @@ import Duckling.Types
|
||||
import qualified Duckling.Distance.CS.Rules as Distance
|
||||
import qualified Duckling.Numeral.CS.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules CS dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules CS dim
|
||||
|
@ -25,20 +25,20 @@ import qualified Duckling.Temperature.Rules as Temperature
|
||||
import qualified Duckling.Url.Rules as Url
|
||||
import qualified Duckling.Volume.Rules as Volume
|
||||
|
||||
rules :: Some Dimension -> [Rule]
|
||||
rules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
rules (This CreditCardNumber) = CreditCardNumber.rules
|
||||
rules (This Distance) = Distance.rules
|
||||
rules (This Duration) = Duration.rules
|
||||
rules (This Email) = Email.rules
|
||||
rules (This Numeral) = Numeral.rules
|
||||
rules (This Ordinal) = []
|
||||
rules (This PhoneNumber) = PhoneNumber.rules
|
||||
rules (This Quantity) = []
|
||||
rules (This RegexMatch) = []
|
||||
rules (This Temperature) = Temperature.rules
|
||||
rules (This Time) = []
|
||||
rules (This TimeGrain) = []
|
||||
rules (This Url) = Url.rules
|
||||
rules (This Volume) = Volume.rules
|
||||
rules (This (CustomDimension dim)) = dimRules dim
|
||||
rules :: Seal Dimension -> [Rule]
|
||||
rules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
rules (Seal CreditCardNumber) = CreditCardNumber.rules
|
||||
rules (Seal Distance) = Distance.rules
|
||||
rules (Seal Duration) = Duration.rules
|
||||
rules (Seal Email) = Email.rules
|
||||
rules (Seal Numeral) = Numeral.rules
|
||||
rules (Seal Ordinal) = []
|
||||
rules (Seal PhoneNumber) = PhoneNumber.rules
|
||||
rules (Seal Quantity) = []
|
||||
rules (Seal RegexMatch) = []
|
||||
rules (Seal Temperature) = Temperature.rules
|
||||
rules (Seal Time) = []
|
||||
rules (Seal TimeGrain) = []
|
||||
rules (Seal Url) = Url.rules
|
||||
rules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.DA.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules DA dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules DA dim
|
||||
|
@ -24,27 +24,27 @@ import qualified Duckling.TimeGrain.DE.Rules as TimeGrain
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Volume.DE.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = Email.rules
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules DE dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = Email.rules
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.EL.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules EL dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Volume.EN.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules dim@(This Time) = TimeUS.rulesBackwardCompatible ++ langRules dim
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules dim@(Seal Time) = TimeUS.rulesBackwardCompatible ++ langRules dim
|
||||
defaultRules dim = langRules dim
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules AU (This AmountOfMoney) = AmountOfMoneyAU.rules
|
||||
localeRules BZ (This AmountOfMoney) = AmountOfMoneyBZ.rules
|
||||
localeRules CA (This AmountOfMoney) = AmountOfMoneyCA.rules
|
||||
localeRules GB (This AmountOfMoney) = AmountOfMoneyGB.rules
|
||||
localeRules IE (This AmountOfMoney) = AmountOfMoneyIE.rules
|
||||
localeRules IN (This AmountOfMoney) = AmountOfMoneyIN.rules
|
||||
localeRules JM (This AmountOfMoney) = AmountOfMoneyJM.rules
|
||||
localeRules NZ (This AmountOfMoney) = AmountOfMoneyNZ.rules
|
||||
localeRules PH (This AmountOfMoney) = AmountOfMoneyPH.rules
|
||||
localeRules TT (This AmountOfMoney) = AmountOfMoneyTT.rules
|
||||
localeRules US (This AmountOfMoney) = AmountOfMoneyUS.rules
|
||||
localeRules ZA (This AmountOfMoney) = AmountOfMoneyZA.rules
|
||||
localeRules AU (This Time) = TimeAU.rules
|
||||
localeRules BZ (This Time) = TimeBZ.rules
|
||||
localeRules CA (This Time) = TimeCA.rules
|
||||
localeRules GB (This Time) = TimeGB.rules
|
||||
localeRules IE (This Time) = TimeIE.rules
|
||||
localeRules IN (This Time) = TimeIN.rules
|
||||
localeRules JM (This Time) = TimeJM.rules
|
||||
localeRules NZ (This Time) = TimeNZ.rules
|
||||
localeRules PH (This Time) = TimePH.rules
|
||||
localeRules TT (This Time) = TimeTT.rules
|
||||
localeRules US (This Time) = TimeUS.rules
|
||||
localeRules ZA (This Time) = TimeZA.rules
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules AU (Seal AmountOfMoney) = AmountOfMoneyAU.rules
|
||||
localeRules BZ (Seal AmountOfMoney) = AmountOfMoneyBZ.rules
|
||||
localeRules CA (Seal AmountOfMoney) = AmountOfMoneyCA.rules
|
||||
localeRules GB (Seal AmountOfMoney) = AmountOfMoneyGB.rules
|
||||
localeRules IE (Seal AmountOfMoney) = AmountOfMoneyIE.rules
|
||||
localeRules IN (Seal AmountOfMoney) = AmountOfMoneyIN.rules
|
||||
localeRules JM (Seal AmountOfMoney) = AmountOfMoneyJM.rules
|
||||
localeRules NZ (Seal AmountOfMoney) = AmountOfMoneyNZ.rules
|
||||
localeRules PH (Seal AmountOfMoney) = AmountOfMoneyPH.rules
|
||||
localeRules TT (Seal AmountOfMoney) = AmountOfMoneyTT.rules
|
||||
localeRules US (Seal AmountOfMoney) = AmountOfMoneyUS.rules
|
||||
localeRules ZA (Seal AmountOfMoney) = AmountOfMoneyZA.rules
|
||||
localeRules AU (Seal Time) = TimeAU.rules
|
||||
localeRules BZ (Seal Time) = TimeBZ.rules
|
||||
localeRules CA (Seal Time) = TimeCA.rules
|
||||
localeRules GB (Seal Time) = TimeGB.rules
|
||||
localeRules IE (Seal Time) = TimeIE.rules
|
||||
localeRules IN (Seal Time) = TimeIN.rules
|
||||
localeRules JM (Seal Time) = TimeJM.rules
|
||||
localeRules NZ (Seal Time) = TimeNZ.rules
|
||||
localeRules PH (Seal Time) = TimePH.rules
|
||||
localeRules TT (Seal Time) = TimeTT.rules
|
||||
localeRules US (Seal Time) = TimeUS.rules
|
||||
localeRules ZA (Seal Time) = TimeZA.rules
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = Email.rules
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules EN dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = Email.rules
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Duration.ES.Rules as Duration
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules dim@(This Numeral) =
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules dim@(Seal Numeral) =
|
||||
NumeralES.rulesBackwardCompatible ++ langRules dim
|
||||
defaultRules dim = langRules dim
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules R.AR (This Numeral) = NumeralAR.rules
|
||||
localeRules CL (This Numeral) = NumeralCL.rules
|
||||
localeRules CO (This Numeral) = NumeralCO.rules
|
||||
localeRules R.ES (This Numeral) = NumeralES.rules
|
||||
localeRules MX (This Numeral) = NumeralMX.rules
|
||||
localeRules PE (This Numeral) = NumeralPE.rules
|
||||
localeRules VE (This Numeral) = NumeralVE.rules
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules R.AR (Seal Numeral) = NumeralAR.rules
|
||||
localeRules CL (Seal Numeral) = NumeralCL.rules
|
||||
localeRules CO (Seal Numeral) = NumeralCO.rules
|
||||
localeRules R.ES (Seal Numeral) = NumeralES.rules
|
||||
localeRules MX (Seal Numeral) = NumeralMX.rules
|
||||
localeRules PE (Seal Numeral) = NumeralPE.rules
|
||||
localeRules VE (Seal Numeral) = NumeralVE.rules
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules ES dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Ordinal.ET.Rules as Ordinal
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules ET dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules ET dim
|
||||
|
@ -18,27 +18,27 @@ import Duckling.Types
|
||||
import qualified Duckling.Numeral.FI.Rules as Numeral
|
||||
import qualified Duckling.TimeGrain.FI.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules FI dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Volume.FR.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = Email.rules
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules FR dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = Email.rules
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Volume.GA.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules GA dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Time.HE.Rules as Time
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules HE dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Temperature.HI.Rules as Temperature
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules HI dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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
|
||||
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules HR dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.HU.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules HU dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Ordinal.ID.Rules as Ordinal
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules ID dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Numeral.IS.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = Email.rules
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules IS dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = Email.rules
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Volume.IT.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = Email.rules
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules IT dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = Email.rules
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.JA.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules JA dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Duration.KA.Rules as Duration
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules KA dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Volume.KM.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules KM dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules KM dim
|
||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.KN.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules KN dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Volume.KO.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules KO dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules KO dim
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.LO.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules LO dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules LO dim
|
||||
|
@ -20,27 +20,27 @@ import Duckling.Types
|
||||
import qualified Duckling.Numeral.ML.Rules as Numeral
|
||||
import qualified Duckling.Ordinal.ML.Rules as Ordinal
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules ML dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Temperature.MN.Rules as Temperature
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules MN dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules MN dim
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.MY.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules MY dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.TimeGrain.NB.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules NB dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules NB dim
|
||||
|
@ -18,27 +18,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.NE.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules NE dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Volume.NL.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules dim@(This Time) = TimeNL.rulesBackwardCompatible ++ langRules dim
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules dim@(Seal Time) = TimeNL.rulesBackwardCompatible ++ langRules dim
|
||||
defaultRules dim = langRules dim
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules BE (This Time) = TimeBE.rules
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules BE (Seal Time) = TimeBE.rules
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules NL dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.PL.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules PL dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Volume.PT.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = PhoneNumber.rules
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules PT dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = PhoneNumber.rules
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Volume.RO.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules RO dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.Volume.RU.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = Quantity.rules
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules RU dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = Quantity.rules
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules RU dim
|
||||
|
@ -20,27 +20,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.SK.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules SK dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.TimeGrain.SV.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules SV dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules SV dim
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.SW.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules SW dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules SW dim
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Types
|
||||
import qualified Duckling.Numeral.TA.Rules as Numeral
|
||||
import qualified Duckling.Ordinal.TA.Rules as Ordinal
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules TA dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules TA dim
|
||||
|
@ -19,27 +19,27 @@ import Duckling.Locale
|
||||
import Duckling.Types
|
||||
import qualified Duckling.Numeral.TH.Rules as Numeral
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = []
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = []
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules TH dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = []
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = []
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
langRules (Seal (CustomDimension dim)) = dimLangRules 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.Volume.TR.Rules as Volume
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = Distance.rules
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = Temperature.rules
|
||||
langRules (This Time) = []
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = Volume.rules
|
||||
langRules (This (CustomDimension dim)) = dimLangRules TR dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = Distance.rules
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = Temperature.rules
|
||||
langRules (Seal Time) = []
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = Volume.rules
|
||||
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.TimeGrain.UK.Rules as TimeGrain
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = []
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = Duration.rules
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules UK dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = []
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = Duration.rules
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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.Time.VI.Rules as Time
|
||||
|
||||
defaultRules :: Some Dimension -> [Rule]
|
||||
defaultRules :: Seal Dimension -> [Rule]
|
||||
defaultRules = langRules
|
||||
|
||||
localeRules :: Region -> Some Dimension -> [Rule]
|
||||
localeRules region (This (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules :: Region -> Seal Dimension -> [Rule]
|
||||
localeRules region (Seal (CustomDimension dim)) = dimLocaleRules region dim
|
||||
localeRules _ _ = []
|
||||
|
||||
langRules :: Some Dimension -> [Rule]
|
||||
langRules (This AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (This CreditCardNumber) = []
|
||||
langRules (This Distance) = []
|
||||
langRules (This Duration) = []
|
||||
langRules (This Email) = []
|
||||
langRules (This Numeral) = Numeral.rules
|
||||
langRules (This Ordinal) = Ordinal.rules
|
||||
langRules (This PhoneNumber) = []
|
||||
langRules (This Quantity) = []
|
||||
langRules (This RegexMatch) = []
|
||||
langRules (This Temperature) = []
|
||||
langRules (This Time) = Time.rules
|
||||
langRules (This TimeGrain) = TimeGrain.rules
|
||||
langRules (This Url) = []
|
||||
langRules (This Volume) = []
|
||||
langRules (This (CustomDimension dim)) = dimLangRules VI dim
|
||||
langRules :: Seal Dimension -> [Rule]
|
||||
langRules (Seal AmountOfMoney) = AmountOfMoney.rules
|
||||
langRules (Seal CreditCardNumber) = []
|
||||
langRules (Seal Distance) = []
|
||||
langRules (Seal Duration) = []
|
||||
langRules (Seal Email) = []
|
||||
langRules (Seal Numeral) = Numeral.rules
|
||||
langRules (Seal Ordinal) = Ordinal.rules
|
||||
langRules (Seal PhoneNumber) = []
|
||||
langRules (Seal Quantity) = []
|
||||
langRules (Seal RegexMatch) = []
|
||||
langRules (Seal Temperature) = []
|
||||
langRules (Seal Time) = Time.rules
|
||||
langRules (Seal TimeGrain) = TimeGrain.rules
|
||||
langRules (Seal Url) = []
|
||||
langRules (Seal Volume) = []
|
||||
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