mirror of
https://github.com/facebook/duckling.git
synced 2024-08-17 09:10:29 +03:00
Numeral/DE: fix eine not being recognized (#684)
Summary: Numbers like "eine million" "eine milliarde" were not recognized correctly. Pull Request resolved: https://github.com/facebook/duckling/pull/684 Reviewed By: girifb Differential Revision: D34274203 Pulled By: stroxler fbshipit-source-id: 2a9018799972d110a9c99d777c622e136566dbe9
This commit is contained in:
parent
c6a48a1d06
commit
ea8a4f6d3b
@ -140,6 +140,7 @@ allExamples = concat
|
||||
[ "1.416,15"
|
||||
]
|
||||
, examples (NumeralValue 1000000.0)
|
||||
[ "1.000.000,00"
|
||||
[ "1.000.000,00",
|
||||
"eine million"
|
||||
]
|
||||
]
|
||||
|
@ -255,7 +255,7 @@ ruleZeroToNineteen :: Rule
|
||||
ruleZeroToNineteen = Rule
|
||||
{ name = "integer (0..19)"
|
||||
, pattern =
|
||||
[ regex "(keine[rn]|keine?s?|null|nichts|eins?(er)?|zwei|dreizehn|drei|vierzehn|vier|fünfzehn|fünf|sechzehn|sechs|siebzehn|sieben|achtzehn|acht|neunzehn|neun|elf|zwölf)"
|
||||
[ regex "(keine[rn]|keine?s?|null|nichts|eins?(er?)?|zwei|dreizehn|drei|vierzehn|vier|fünfzehn|fünf|sechzehn|sechs|siebzehn|sieben|achtzehn|acht|neunzehn|neun|elf|zwölf)"
|
||||
]
|
||||
, prod = \tokens -> case tokens of
|
||||
(Token RegexMatch (GroupMatch (match:_)):_) ->
|
||||
|
Loading…
Reference in New Issue
Block a user