Volume - extend interval support

Reviewed By: haoxuany

Differential Revision: D26255089

Pulled By: chessai

fbshipit-source-id: e4bdb0aa3c1be55dff0a5577155a3d0469d6762d
This commit is contained in:
kcnhk1@gmail.com 2021-02-04 11:48:07 -08:00 committed by Facebook GitHub Bot
parent 67c1dbe94f
commit 722cc838ff
2 changed files with 4 additions and 3 deletions

View File

@ -75,6 +75,7 @@ allExamples = concat
, examples (between Litre (2,3))
[ "二至三公升"
, "2-3L"
, "2~3公升"
, "兩到三升"
, "兩升到三升"
]

View File

@ -84,7 +84,7 @@ ruleIntervalBetweenNumeral = Rule
{ name = "between|from <numeral> and|to <volume>"
, pattern =
[ Predicate isPositive
, regex "-|至|到"
, regex "-|~|至|到"
, Predicate isSimpleVolume
]
, prod = \case
@ -102,7 +102,7 @@ ruleIntervalBetween = Rule
{ name = "between|from <volume> to|and <volume>"
, pattern =
[ Predicate isSimpleVolume
, regex "-|至|到"
, regex "-|~|至|到"
, Predicate isSimpleVolume
]
, prod = \case
@ -151,7 +151,7 @@ ruleIntervalMin :: Rule
ruleIntervalMin = Rule
{ name = "more than <volume>"
, pattern =
[ regex "至少|最少"
[ regex "至少|最少|起碼"
, Predicate isSimpleVolume
]
, prod = \case