mirror of
https://github.com/facebook/duckling.git
synced 2024-11-24 07:23:03 +03:00
AmountOfMoney/EN: Make ruleIntervalMax, ruleIntervalMin symmetric
Summary: When I was working on some related diffs, I noticed that there were some asymmetries between the regexes for ruleIntervalMax and ruleIntervalMin: - we had no support for "at most", even though we did have "at least" - we had no support for "not? less than" - the ordering of the different constructions didn't match This a minor tweak to make things match better Reviewed By: patapizza Differential Revision: D20484594 fbshipit-source-id: c3c54a9cc1b83402e42634b7a98a1a3b8cc5e09c
This commit is contained in:
parent
9b69b1fc96
commit
4bfe50eed0
@ -220,12 +220,15 @@ allExamples = concat
|
||||
[ "under seven euros"
|
||||
, "less than 7 EUR"
|
||||
, "lower than 7€"
|
||||
, "no more than 7 euros"
|
||||
, "at most 7€"
|
||||
]
|
||||
, examples (above Dollar 1.42)
|
||||
[ "more than 1 dollar and forty-two cents"
|
||||
, "at least $1.42"
|
||||
, "over 1.42 dollars"
|
||||
, "above a dollar and 42 cents"
|
||||
, "no less than $1.42"
|
||||
]
|
||||
, examples (simple INR 5e5)
|
||||
[ "5 lakh rupees"
|
||||
|
@ -337,7 +337,7 @@ ruleIntervalMax :: Rule
|
||||
ruleIntervalMax = Rule
|
||||
{ name = "under/less/lower/no more than <amount-of-money>"
|
||||
, pattern =
|
||||
[ regex "under|(less|lower|not? more) than"
|
||||
[ regex "under|at most|(less|lower|not? more) than"
|
||||
, Predicate isSimpleAmountOfMoney
|
||||
]
|
||||
, prod = \tokens -> case tokens of
|
||||
@ -352,7 +352,7 @@ ruleIntervalMin :: Rule
|
||||
ruleIntervalMin = Rule
|
||||
{ name = "over/above/at least/more than <amount-of-money>"
|
||||
, pattern =
|
||||
[ regex "over|above|at least|more than"
|
||||
[ regex "over|above|at least|(more|not? less) than"
|
||||
, Predicate isSimpleAmountOfMoney
|
||||
]
|
||||
, prod = \tokens -> case tokens of
|
||||
|
Loading…
Reference in New Issue
Block a user