mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
Volume - extend interval support
Reviewed By: haoxuany Differential Revision: D26255089 Pulled By: chessai fbshipit-source-id: e4bdb0aa3c1be55dff0a5577155a3d0469d6762d
This commit is contained in:
parent
67c1dbe94f
commit
722cc838ff
@ -75,6 +75,7 @@ allExamples = concat
|
||||
, examples (between Litre (2,3))
|
||||
[ "二至三公升"
|
||||
, "2-3L"
|
||||
, "2~3公升"
|
||||
, "兩到三升"
|
||||
, "兩升到三升"
|
||||
]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user