mirror of
https://github.com/facebook/duckling.git
synced 2025-01-07 06:19:10 +03:00
Polish(PL) - Support for seventy, eighty, ninety (#417)
Summary: Support for polish equivalents of seventy, eighty, ninety. Pull Request resolved: https://github.com/facebook/duckling/pull/417 Reviewed By: patapizza Differential Revision: D26130642 Pulled By: chessai fbshipit-source-id: 4a0be944dcd0a9dea155caae145cf4a38537753f
This commit is contained in:
parent
6346cfe926
commit
d5fac5f14e
@ -98,6 +98,22 @@ allExamples = concat
|
||||
[ "5 tysięcy"
|
||||
, "pięć tysięcy"
|
||||
]
|
||||
, examples (NumeralValue 79)
|
||||
[ "siedemdziesiąt dziewięć"
|
||||
, "siedemdziesięciu dziewięciu"
|
||||
]
|
||||
, examples (NumeralValue 84)
|
||||
[ "osiemdziesiąt cztery"
|
||||
, "osiemdziesiat cztery"
|
||||
, "osiemdziesięciu czterem"
|
||||
, "osiemdziesieciu czterem"
|
||||
]
|
||||
, examples (NumeralValue 92)
|
||||
[ "dziewięćdziesiąt dwa"
|
||||
, "dziewiecdziesiat dwa"
|
||||
, "dziewięćdziesięciu dwóm"
|
||||
, "dziewiecdziesieciu dwom"
|
||||
]
|
||||
, examples (NumeralValue 122)
|
||||
[ "sto dwadzieścia dwa"
|
||||
]
|
||||
|
@ -60,6 +60,33 @@ ruleSixty = Rule
|
||||
, prod = \_ -> integer 60
|
||||
}
|
||||
|
||||
ruleSeventy :: Rule
|
||||
ruleSeventy = Rule
|
||||
{ name = "seventy"
|
||||
, pattern =
|
||||
[ regex "siedemdziesi((a|ą)t|(e|ę)ci(u|oma))"
|
||||
]
|
||||
, prod = \_ -> integer 70
|
||||
}
|
||||
|
||||
ruleEighty :: Rule
|
||||
ruleEighty = Rule
|
||||
{ name = "eighty"
|
||||
, pattern =
|
||||
[ regex "osiemdziesi((a|ą)t|(e|ę)ci(u|oma))"
|
||||
]
|
||||
, prod = \_ -> integer 80
|
||||
}
|
||||
|
||||
ruleNinety :: Rule
|
||||
ruleNinety = Rule
|
||||
{ name = "ninety"
|
||||
, pattern =
|
||||
[ regex "dziewi(e|ę)(c|ć)dziesi((a|ą)|(e|ę))(t|ci(u|oma))"
|
||||
]
|
||||
, prod = \_ -> integer 90
|
||||
}
|
||||
|
||||
ruleIntersectWithAnd :: Rule
|
||||
ruleIntersectWithAnd = Rule
|
||||
{ name = "intersect (with and)"
|
||||
@ -552,6 +579,7 @@ rules =
|
||||
, ruleDozen
|
||||
, ruleEight
|
||||
, ruleEighteen
|
||||
, ruleEighty
|
||||
, ruleEleven
|
||||
, ruleFifteen
|
||||
, ruleFifty
|
||||
@ -567,6 +595,7 @@ rules =
|
||||
, ruleMultiply
|
||||
, ruleNine
|
||||
, ruleNineteen
|
||||
, ruleNinety
|
||||
, ruleNumeral
|
||||
, ruleNumeral2
|
||||
, ruleNumeral3
|
||||
@ -582,6 +611,7 @@ rules =
|
||||
, ruleOne
|
||||
, ruleSeven
|
||||
, ruleSeventeen
|
||||
, ruleSeventy
|
||||
, ruleSingle
|
||||
, ruleSix
|
||||
, ruleSixteen
|
||||
|
@ -8,7 +8,6 @@
|
||||
module Duckling.Numeral.PL.Tests
|
||||
( tests ) where
|
||||
|
||||
import Prelude
|
||||
import Data.String
|
||||
import Test.Tasty
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user