-- 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.NL.Corpus
  ( corpus
  , negativeCorpus
  ) 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
NL Maybe Region
forall a. Maybe a
Nothing}, Options
testOptions, [Example]
allExamples)

negativeCorpus :: NegativeCorpus
negativeCorpus :: NegativeCorpus
negativeCorpus = (Context
testContext {locale :: Locale
locale = Lang -> Maybe Region -> Locale
makeLocale Lang
NL Maybe Region
forall a. Maybe a
Nothing}, Options
testOptions, [Text]
examples)
  where
    examples :: [Text]
examples =
      [ Text
"voor maanden"
      , Text
"in enkele dagen"
      , Text
"secretaris"
      , Text
"last minute"
      , Text
"12 uurtje"
      ]

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
1 Grain
Second)
             [ Text
"een seconde"
             , Text
"één seconde"
             , Text
"1 secondes"
             , Text
"1 s"
             , Text
"1\""
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
14 Grain
Second)
             [ Text
"veertien seconden"
             , Text
"14 s"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
2 Grain
Minute)
             [ Text
"2 min"
             , Text
"twee minuten"
             , Text
"2 m"
             , Text
"2'"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
45 Grain
Minute)
             [ Text
"3 kwartier"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
90 Grain
Minute)
             [ Text
"anderhalf uur"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
75 Grain
Minute)
             [ Text
"een uur en een kwartier"
             , Text
"een uur en 15 minuten"
             , Text
"een uur, 15 minuten"
             , Text
"een uur 15 minuten"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
165 Grain
Minute)
             [ Text
"twee uur en drie kwartier"
             , Text
"twee uur, 3 kwartier"
             , Text
"twee uur, 45 minuten"
             , Text
"twee uur 45 minuten"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
1 Grain
Hour)
             [ Text
"een uur"
             , Text
"één uur"
             , Text
"1 u"
             , Text
"1 h"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
30 Grain
Day)
             [ Text
"30 dagen"
             , Text
"4 weken en 2 dagen"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
7 Grain
Day)
             [ Text
"7 dagen"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
7 Grain
Week)
             [ Text
"zeven weken"
             , Text
"7 w"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
1 Grain
Month)
             [ Text
"1 mnd"
             , Text
"een maand"
             , Text
"één maand"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
3 Grain
Quarter)
             [ Text
"drie kwartalen"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
2 Grain
Year)
             [ Text
"2 jaar"
             , Text
"2 jaren"
             , Text
"twee jaren"
             , Text
"2 j"
             ]
  , DurationData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Int -> Grain -> DurationData
DurationData Int
150 Grain
Minute)
            [ Text
"twee en een half uur"
            , Text
"2,5 uur"
            ]
  ]