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

import Prelude
import Data.String

import Duckling.Duration.Types
import Duckling.Locale
import Duckling.Resolve
import Duckling.Testing.Types
import Duckling.TimeGrain.Types (Grain(..))

corpus :: Corpus
corpus :: Corpus
corpus = (Context
testContext {locale :: Locale
locale = Lang -> Maybe Region -> Locale
makeLocale Lang
ES Maybe Region
forall a. Maybe a
Nothing}, Options
testOptions, [Example]
allExamples)

allExamples :: [Example]
allExamples :: [Example]
allExamples = [[Example]] -> [Example]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat
  [ DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
30 Grain
Minute)
             [ Text
"media hora"
             , Text
"media horas"
             , Text
"30 minutos"
             , Text
"treinta minutos"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
15 Grain
Minute)
             [  Text
"cuarto de hora"
             ,  Text
"cuartos de hora"
             ,  Text
"quince minutos"
             ,  Text
"15 minutos"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
45 Grain
Minute)
             [  Text
"tres cuartos de hora"
             ,  Text
"tres cuartos de horas"
             ,  Text
"tres cuarto de hora"
             ,  Text
"tres cuarto de horas"
             ,  Text
"cuarenta y cinco minutos"
             ,  Text
"45 minutos"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
92 Grain
Minute)
             [
               Text
"una hora y treinta y dos minutos"
             , Text
"una hora treinta y dos minutos"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
155 Grain
Minute)
             [
               Text
"dos hora y treinta y cinco minutos"
             , Text
"dos hora  treinta y cinco minutos"
             ]
  ]