duckling/Duckling/Numeral/ES/VE/Corpus.hs
Jiaxu Zhu 0527be1ce0 Adding Locales for ES Numeral
Summary:
Adding locale rules for ES Numeral because Spain use "," as decimal but south american country use "." as decimal.

Wiki: https://en.wikipedia.org/wiki/Decimal_separator

Reviewed By: haoxuany

Differential Revision: D20040111

fbshipit-source-id: e2a4bfc2928df19976ef98e90ee82e7d21b52313
2020-02-25 16:01:45 -08:00

33 lines
1019 B
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.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.ES.VE.Corpus (allExamples) where
import Data.String
import Prelude
import Duckling.Numeral.Types
import Duckling.Testing.Types
allExamples :: [Example]
allExamples =
concat
[ examples (NumeralValue 1) ["1"]
, examples (NumeralValue 33) ["33"]
, examples (NumeralValue 1.1) ["1,1", "1,10", "01,10"]
, examples (NumeralValue 0.77) ["0,77", ",77"]
, examples (NumeralValue 100000) ["100.000", "100000"]
, examples (NumeralValue 243) ["243"]
, examples (NumeralValue 3000000) ["3000000", "3.000.000"]
, examples (NumeralValue 1200000) ["1.200.000", "1200000"]
, examples
(NumeralValue (-1200000))
["- 1.200.000", "menos 1.200.000", "-1,2M", "-,0012G"]
, examples (NumeralValue 1.5) ["1,5"]
]