duckling/Duckling/Distance/EN/Corpus.hs
Lucas Hosseini 1f7290880c Distance interval support.
Summary: Interval support for distances (common types + EN rules).

Reviewed By: patapizza

Differential Revision: D6942340

fbshipit-source-id: d05ff337167b11c9186f38ca04bacf0d24a41526
2018-02-09 16:16:04 -08:00

72 lines
1.8 KiB
Haskell

-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Distance.EN.Corpus
( corpus ) where
import Prelude
import Data.String
import Duckling.Distance.Types
import Duckling.Testing.Types
corpus :: Corpus
corpus = (testContext, allExamples)
allExamples :: [Example]
allExamples = concat
[ examples (simple Kilometre 3)
[ "3 kilometers"
, "3 km"
, "3km"
, "3k"
, "3.0 km"
]
, examples (simple Mile 8)
[ "8 miles"
, "eight mile"
, "8 mi"
]
, examples (simple M 9)
[ "9m"
]
, examples (simple Centimetre 2)
[ "2cm"
, "2 centimeters"
]
, examples (simple Inch 5)
[ "5 in"
, "5''"
, "five inches"
, "5\""
]
, examples (simple Metre 1.87)
[ "1.87 meters"
]
, examples (between Kilometre (3, 5))
[ "between 3 and 5 kilometers"
, "from 3km to 5km"
, "around 3-5 kilometers"
, "about 3km-5km"
, "3-5 kilometers"
]
, examples (under Mile 3.5)
[ "under 3.5 miles"
, "less than 3.5mi"
, "lower than three point five miles"
]
, examples (above Inch 5)
[ "more than five inches"
, "at least 5''"
, "over 5\""
, "above 5 in"
]
]