mirror of
https://github.com/facebook/duckling.git
synced 2024-12-01 16:26:20 +03:00
83ea150d94
Summary: We noticed that using UTF-8 characters directly in regexes work. Hence converting back the escaped characters for readability and maintenance. Reviewed By: blandinw Differential Revision: D5787146 fbshipit-source-id: e5a4b9a
34 lines
753 B
Haskell
34 lines
753 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. An additional grant
|
|
-- of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
{-# LANGUAGE GADTs #-}
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module Duckling.Ordinal.VI.Rules
|
|
( rules ) where
|
|
|
|
import Data.String
|
|
import Prelude
|
|
|
|
import Duckling.Dimensions.Types
|
|
import Duckling.Ordinal.Helpers
|
|
import Duckling.Types
|
|
|
|
ruleOrdinals :: Rule
|
|
ruleOrdinals = Rule
|
|
{ name = "ordinals"
|
|
, pattern =
|
|
[ regex "(đầu tiên|thứ nhất|thứ 1)"
|
|
]
|
|
, prod = \_ -> Just $ ordinal 1
|
|
}
|
|
|
|
rules :: [Rule]
|
|
rules =
|
|
[ ruleOrdinals
|
|
]
|