mirror of
https://github.com/facebook/duckling.git
synced 2024-12-11 06:46:26 +03:00
0527be1ce0
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
33 lines
1019 B
Haskell
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"]
|
|
]
|