Skip to content

Commit 8af3ae5

Browse files
jimreganfacebook-github-bot
authored andcommitted
also match old-style -adh ending
Summary: Closes facebook#47 Reviewed By: niteria Differential Revision: D5318111 Pulled By: patapizza fbshipit-source-id: 963450b
1 parent 3ec5390 commit 8af3ae5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Duckling/Ordinal/GA/Corpus.hs

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ allExamples :: [Example]
2626
allExamples = concat
2727
[ examples (OrdinalData 6)
2828
[ "séu"
29+
, "6a"
30+
, "6d"
31+
, "06u"
32+
, "6 ú"
33+
, "0006 adh"
2934
]
3035
, examples (OrdinalData 1)
3136
[ "chead"

Duckling/Ordinal/GA/Rules.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ruleOrdinalDigits :: Rule
107107
ruleOrdinalDigits = Rule
108108
{ name = "ordinal (digits)"
109109
, pattern =
110-
[ regex "0*(\\d+) ?(a|d|(\x00fa|u))"
110+
[ regex "0*(\\d+) ?(adh|a|d|\x00fa|u)"
111111
]
112112
, prod = \tokens -> case tokens of
113113
(Token RegexMatch (GroupMatch (match:_)):_) -> ordinal <$> parseInt match

0 commit comments

Comments
 (0)