{-# LANGUAGE OverloadedStrings #-}
module Duckling.Email.EN.Corpus
( corpus
, negativeCorpus
) where
import Data.String
import Prelude
import qualified Data.Text as Text
import Duckling.Email.Types
import Duckling.Testing.Types
negativeCorpus :: NegativeCorpus
negativeCorpus :: NegativeCorpus
negativeCorpus = (Context
testContext, Options
testOptions, [Text]
examples)
where
examples :: [Text]
examples =
[ Text
"fitness at 6.40"
, Text
"class at 12.00"
, Text
"tonight at 9.15"
, Text
" dot 2@abci"
, Text
"x@ dot x"
, Text
"x@ x dot "
, Text
"abc@x dot "
, Int -> Text -> Text
Text.replicate Int
10000 Text
"a at a"
]
corpus :: Corpus
corpus :: Corpus
corpus = (Context
testContext, Options
testOptions, [Example]
allExamples)
allExamples :: [Example]
allExamples :: [Example]
allExamples = [[Example]] -> [Example]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat
[ EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"alice@exAmple.io")
[ Text
"alice at exAmple.io"
]
, EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"yo+yo@blah.org")
[ Text
"yo+yo at blah.org"
]
, EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"1234+abc@x.net")
[ Text
"1234+abc at x.net"
]
, EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"jean-jacques@stuff.co.uk")
[ Text
"jean-jacques at stuff.co.uk"
]
, EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"asdf+ab.c@gmail.com")
[ Text
"asdf+ab dot c at gmail dot com"
]
, EmailData -> [Text] -> [Example]
forall a. ToJSON a => a -> [Text] -> [Example]
examples (Text -> EmailData
EmailData Text
"asdf.k@fb.com")
[ Text
"asdf dot k@fb dot com"
]
]