-- 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.Quantity.ES.Corpus
  ( corpus
  ) where

import Prelude
import Data.String

import Duckling.Locale
import Duckling.Quantity.Types
import Duckling.Resolve
import Duckling.Testing.Types

context :: Context
context :: Context
context = Context
testContext { locale :: Locale
locale = Lang -> Maybe Region -> Locale
makeLocale Lang
ES Maybe Region
forall a. Maybe a
Nothing }

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

allExamples :: [Example]
allExamples :: [Example]
allExamples = [[Example]] -> [Example]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat
  [ QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Pound Double
2 (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"carne"))
             [ Text
"dos libras de carne"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Gram Double
2 Maybe Text
forall a. Maybe a
Nothing)
             [ Text
"dos gramos"
             , Text
"0,002 kg"
             , Text
"2/1000 kilogramos"
             , Text
"2000 miligramos"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Gram Double
1000 Maybe Text
forall a. Maybe a
Nothing)
             [ Text
"un kilogramo"
             , Text
"un kg"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Pound Double
1 Maybe Text
forall a. Maybe a
Nothing)
             [ Text
"una libra"
             , Text
"1 lb"
             , Text
"una lb"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Ounce Double
2 Maybe Text
forall a. Maybe a
Nothing)
             [ Text
"2 onzas"
             , Text
"2oz"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Cup Double
3 (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"azucar"))
             [ Text
"tres tazas de azucar"
             , Text
"3 tazas de AzUcAr"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Cup Double
0.75 Maybe Text
forall a. Maybe a
Nothing)
             [ Text
"3/4 taza"
             , Text
"0,75 taza"
             , Text
",75 tazas"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
simple Unit
Gram Double
500 (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"fresas"))
             [ Text
"500 gramos de fresas"
             , Text
"500g de fresas"
             , Text
"0,5 kilogramos de fresas"
             , Text
"0,5 kg de fresas"
             , Text
"500000mg de fresas"
             ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
under Unit
Pound Double
6 (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"carne"))
              [ Text
"menos que seis libras de carne"
              , Text
"no más que 6 lbs de carne"
              , Text
"por debajo de 6,0 libras de carne"
              , Text
"a lo sumo seis libras de carne"
              ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
above Unit
Cup Double
2 Maybe Text
forall a. Maybe a
Nothing)
              [ Text
"excesivo 2 tazas"
              , Text
"como mínimo dos tazas"
              , Text
"mayor de 2 tazas"
              , Text
"más de 2 tazas"
              ]
  , QuantityValue -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Unit -> Double -> Maybe Text -> QuantityValue
above Unit
Ounce Double
4 (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"chocolate"))
              [ Text
"excesivo 4 oz de chocolate"
              , Text
"al menos 4,0 oz de chocolate"
              , Text
"mayor de cuatro onzas de chocolate"
              , Text
"más de cuatro onzas de chocolate"
              ]
  ]