mirror of
https://github.com/facebook/duckling.git
synced 2024-12-11 06:46:26 +03:00
54c9448fba
Summary: For consistency with the dimension name. Reviewed By: JonCoens Differential Revision: D4722216 fbshipit-source-id: 82c56d3
128 lines
3.1 KiB
Haskell
128 lines
3.1 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.Numeral.FR.Corpus
|
|
( corpus ) where
|
|
|
|
import Prelude
|
|
import Data.String
|
|
|
|
import Duckling.Lang
|
|
import Duckling.Numeral.Types
|
|
import Duckling.Resolve
|
|
import Duckling.Testing.Types
|
|
|
|
corpus :: Corpus
|
|
corpus = (testContext {lang = FR}, allExamples)
|
|
|
|
allExamples :: [Example]
|
|
allExamples = concat
|
|
[ examples (NumeralValue 0)
|
|
[ "0"
|
|
, "zero"
|
|
, "zéro"
|
|
]
|
|
, examples (NumeralValue 1)
|
|
[ "1"
|
|
, "un"
|
|
, "une"
|
|
]
|
|
, examples (NumeralValue 11)
|
|
[ "onze"
|
|
]
|
|
, examples (NumeralValue 17)
|
|
[ "dix sept"
|
|
, "dix-sept"
|
|
]
|
|
, examples (NumeralValue 21)
|
|
[ "vingt et un"
|
|
, "vingt-et-un"
|
|
]
|
|
, examples (NumeralValue 23)
|
|
[ "vingt trois"
|
|
, "vingt-trois"
|
|
]
|
|
, examples (NumeralValue 70)
|
|
[ "soixante dix"
|
|
]
|
|
, examples (NumeralValue 71)
|
|
[ "soixante onze"
|
|
]
|
|
, examples (NumeralValue 78)
|
|
[ "soixante dix huit"
|
|
]
|
|
, examples (NumeralValue 73)
|
|
[ "soixante treize"
|
|
]
|
|
, examples (NumeralValue 80)
|
|
[ "quatre vingt"
|
|
]
|
|
, examples (NumeralValue 81)
|
|
[ "quatre vingt un"
|
|
]
|
|
, examples (NumeralValue 82)
|
|
[ "quatre vingt deux"
|
|
]
|
|
, examples (NumeralValue 90)
|
|
[ "quatre vingt dix"
|
|
]
|
|
, examples (NumeralValue 91)
|
|
[ "quatre vingt onze"
|
|
]
|
|
, examples (NumeralValue 92)
|
|
[ "quatre vingt douze"
|
|
]
|
|
, examples (NumeralValue 99)
|
|
[ "quatre vingt dix neuf"
|
|
]
|
|
, examples (NumeralValue 33)
|
|
[ "33"
|
|
, "trente trois"
|
|
, "trente-trois"
|
|
, "trente 3"
|
|
]
|
|
, examples (NumeralValue 118)
|
|
[ "cent dix-huit"
|
|
]
|
|
, examples (NumeralValue 4020)
|
|
[ "quatre mille vingt"
|
|
]
|
|
, examples (NumeralValue 100000)
|
|
[ "100.000"
|
|
, "100000"
|
|
, "100K"
|
|
, "100k"
|
|
, "cent mille"
|
|
]
|
|
, examples (NumeralValue 3000000)
|
|
[ "3M"
|
|
, "3000K"
|
|
, "3000000"
|
|
, "3.000.000"
|
|
, "trois millions"
|
|
]
|
|
, examples (NumeralValue 1200000)
|
|
[ "1.200.000"
|
|
, "1200000"
|
|
, "1,2M"
|
|
, "1200K"
|
|
, ",0012G"
|
|
, "un million deux cent mille"
|
|
]
|
|
, examples (NumeralValue (-1200000))
|
|
[ "- 1.200.000"
|
|
, "-1200000"
|
|
, "moins 1200000"
|
|
, "-1,2M"
|
|
, "-1200K"
|
|
, "-,0012G"
|
|
]
|
|
]
|