-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.


{-# LANGUAGE OverloadedStrings #-}

module Duckling.AmountOfMoney.EN.Corpus
  ( corpus
  , negativeCorpus
  , latentCorpus
  ) where

import Data.String
import Prelude

import Duckling.AmountOfMoney.Types
import Duckling.Resolve (Options(..))
import Duckling.Testing.Types

negativeCorpus :: NegativeCorpus
negativeCorpus :: NegativeCorpus
negativeCorpus = (Context
testContext, Options
testOptions, [Text]
examples)
  where
    examples :: [Text]
examples =
      [ Text
"exactly dollars"
      ]

corpus :: Corpus
corpus :: Corpus
corpus = (Context
testContext, Options
testOptions, [Example]
allExamples)

latentCorpus :: Corpus
latentCorpus :: Corpus
latentCorpus = (Context
testContext, Options
testOptions {withLatent :: Bool
withLatent = Bool
True}, [Example]
xs)
  where
    xs :: [Example]
xs = [[Example]] -> [Example]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat
      [ AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Unnamed Double
5)
                 [ Text
"five"
                 , Text
"5"
                 , Text
"about 5"
                 ]
      , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Unnamed Double
7.2)
                 [ Text
"7.2"
                 , Text
"7.20000"
                 ]
      ]

allExamples :: [Example]
allExamples :: [Example]
allExamples = [[Example]] -> [Example]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat
  [ AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Dollar Double
1)
             [ Text
"$1"
             , Text
"one dollar"
             , Text
"a dollar"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Dollar Double
10)
             [ Text
"$10"
             , Text
"$ 10"
             , Text
"10$"
             , Text
"10 dollars"
             , Text
"ten dollars"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Cent Double
10)
             [ Text
"10 cent"
             , Text
"ten pennies"
             , Text
"ten cents"
             , Text
"10 c"
             , Text
"10¢"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Dollar Double
1e4)
             [ Text
"$10K"
             , Text
"10k$"
             , Text
"$10,000"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
USD Double
3.14)
             [ Text
"USD3.14"
             , Text
"3.14US$"
             , Text
"US$ 3.14"
             , Text
"US$3 and fourteen"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
EUR Double
20)
             [ Text
"20\x20ac"
             , Text
"20 euros"
             , Text
"20 Euro"
             , Text
"20 Euros"
             , Text
"EUR 20"
             , Text
"EUR 20.0"
             , Text
"20€"
             , Text
"20 €ur"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Pound Double
10)
             [ Text
"\x00a3\&10"
             , Text
"ten pounds"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
INR Double
20)
             [ Text
"Rs. 20"
             , Text
"Rs 20"
             , Text
"20 Rupees"
             , Text
"20Rs"
             , Text
"Rs20"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
INR Double
20.43)
             [ Text
"20 Rupees 43"
             , Text
"twenty rupees 43"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Dollar Double
20.43)
             [ Text
"$20 and 43c"
             , Text
"$20 43"
             , Text
"20 dollar 43c"
             , Text
"20 dollars 43 cents"
             , Text
"twenty dollar 43 cents"
             , Text
"20 dollar 43"
             , Text
"twenty dollar and 43"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
GBP Double
3.01)
             [ Text
"GBP3.01"
             , Text
"GBP 3.01"
             , Text
"3 GBP 1 pence"
             , Text
"3 GBP and one"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
CAD Double
3.03)
             [ Text
"CAD3.03"
             , Text
"CAD 3.03"
             , Text
"3 CAD 3 cents"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
CHF Double
3.04)
             [ Text
"CHF3.04"
             , Text
"CHF 3.04"
             , Text
"3 CHF 4 cents"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
CNY Double
3)
             [ Text
"CNY3"
             , Text
"CNY 3"
             , Text
"3 CNY"
             , Text
"3 yuan"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Unnamed Double
42)
             [ Text
"42 bucks"
             , Text
"around 42 bucks"
             , Text
"exactly 42 bucks"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
KWD Double
42)
             [ Text
"42 KWD"
             , Text
"42 kuwaiti Dinar"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
LBP Double
42)
             [ Text
"42 LBP"
             , Text
"42 Lebanese Pounds"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
EGP Double
42)
             [ Text
"42 EGP"
             , Text
"42 egyptianpound"
             , Text
"42 LE"
             , Text
"42 L.E"
             , Text
"42 l.e."
             , Text
"42 le"
             , Text
"42 geneh"
             , Text
"42 genihat masriya"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
QAR Double
42)
             [ Text
"42 QAR"
             , Text
"42 qatari riyals"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
SAR Double
42)
             [ Text
"42 SAR"
             , Text
"42 Saudiriyal"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
BGN Double
42)
             [ Text
"42 BGN"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
MYR Double
42)
             [ Text
"42 MYR"
             , Text
"42 RM"
             , Text
"RM 42"
             , Text
"MYR 42"
             , Text
"42MYR"
             , Text
"42RM"
             , Text
"RM42"
             , Text
"MYR42"
             , Text
"ringgit 42"
             , Text
"42 ringgit"
             , Text
"42 malaysia ringgit"
             , Text
"malaysia ringgit 42"
             , Text
"42 malaysian ringgit"
             , Text
"malaysian ringgit 42"
             , Text
"42 malaysia ringgits"
             , Text
"malaysia ringgits 42"
             , Text
"42 malaysian ringgits"
             , Text
"malaysian ringgits 42"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
MYR Double
20.43)
             [ Text
"20 ringgit and 43c"
             , Text
"20 ringgit and 43 sen"
             , Text
"twenty ringgit 43 sens"
             , Text
"20 ringgit 43"
             , Text
"twenty ringgit and 43"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Dinar Double
10)
             [ Text
"10 dinars"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
ILS Double
10)
             [ Text
"ten shekels"
             , Text
"10 ILS"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Riyal Double
10)
             [ Text
"ten riyals"
             , Text
"10 riyals"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
Rial Double
10)
             [ Text
"ten rials"
             , Text
"10 rials"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> (Double, Double) -> AmountOfMoneyValue
between Currency
Dollar (Double
10, Double
20))
             [ Text
"between 10 and 20 dollars"
             , Text
"from 10 dollars to 20 dollars"
             , Text
"around 10-20 dollars"
             , Text
"between 10 dollars and 20 dollars"
             , Text
"from 10 to 20 dollars"
             , Text
"about $10-$20"
             , Text
"10-20 dollars"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> (Double, Double) -> AmountOfMoneyValue
between Currency
Dollar (Double
1.1, Double
1.3))
             [ Text
"between 1.1 and 1.3 dollars"
             , Text
"from 1 point 1 and one point three dollars"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
under Currency
EUR Double
7)
             [ Text
"under seven euros"
             , Text
"less than 7 EUR"
             , Text
"lower than 7€"
             , Text
"no more than 7 euros"
             , Text
"at most 7€"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
above Currency
Dollar Double
1.42)
             [ Text
"more than 1 dollar and forty-two cents"
             , Text
"at least $1.42"
             , Text
"over 1.42 dollars"
             , Text
"above a dollar and 42 cents"
             , Text
"no less than $1.42"
             ]
   , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
INR Double
5e5)
             [ Text
"5 lakh rupees"
             , Text
"five lakhs rupees"
             ]
   , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> (Double, Double) -> AmountOfMoneyValue
between Currency
INR (Double
7, Double
9e5))
             [ Text
"7-9 lakh rupees"
             ]
   , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
INR Double
4e7)
             [ Text
"four crore rupees"
             , Text
"4 crores rupees"
             ]
   , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
MNT Double
10)
             [ Text
"ten tugriks"
             , Text
"10 Tugrik"
             , Text
"10MNT"
             ]
   , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
USD Double
4.7e9)
             [ Text
"US$4.7 billion"
             , Text
"a US$4.7 billion"
             , Text
"a US$ 4.7 billion"
             ]
  , AmountOfMoneyValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Currency -> Double -> AmountOfMoneyValue
simple Currency
UAH Double
3.04)
             [ Text
"UAH3.04"
             , Text
"UAH 3.04"
             , Text
"3 UAH 4 kopiykas"
             ]
  ]