mirror of
https://github.com/facebook/duckling.git
synced 2024-12-11 06:46:26 +03:00
b541354c31
Summary: Hello, I am new to Haskell, but I would like to add Khmer language (KM) to Duckling. I have tried to extended Duckling by adding Numeral dimension for new language KM. Please have a look at it and see what we can improve. Thanks! Pull Request resolved: https://github.com/facebook/duckling/pull/234 Reviewed By: blandinw Differential Revision: D9032639 Pulled By: chinmay87 fbshipit-source-id: 7db19edf732fe6500629cc89e18e0655d7bbc48b
71 lines
1.5 KiB
Haskell
71 lines
1.5 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.KM.Corpus
|
|
( corpus ) where
|
|
|
|
import Data.String
|
|
import Prelude
|
|
|
|
import Duckling.Locale
|
|
import Duckling.Numeral.Types
|
|
import Duckling.Resolve
|
|
import Duckling.Testing.Types
|
|
|
|
context :: Context
|
|
context = testContext {locale = makeLocale KM Nothing}
|
|
|
|
corpus :: Corpus
|
|
corpus = (context, testOptions, allExamples)
|
|
|
|
allExamples :: [Example]
|
|
allExamples = concat
|
|
[ examples (NumeralValue 0)
|
|
[ "0"
|
|
, "០"
|
|
]
|
|
, examples (NumeralValue 1)
|
|
[ "1"
|
|
, "១"
|
|
]
|
|
, examples (NumeralValue 2)
|
|
[ "2"
|
|
, "២"
|
|
]
|
|
, examples (NumeralValue 3)
|
|
[ "3"
|
|
, "៣"
|
|
]
|
|
, examples (NumeralValue 4)
|
|
[ "4"
|
|
, "៤"
|
|
]
|
|
, examples (NumeralValue 5)
|
|
[ "5"
|
|
, "៥"
|
|
]
|
|
, examples (NumeralValue 6)
|
|
[ "6"
|
|
, "៦"
|
|
]
|
|
, examples (NumeralValue 7)
|
|
[ "7"
|
|
, "៧"
|
|
]
|
|
, examples (NumeralValue 8)
|
|
[ "8"
|
|
, "៨"
|
|
]
|
|
, examples (NumeralValue 9)
|
|
[ "9"
|
|
, "៩"
|
|
]
|
|
]
|