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:
Steven Troxler 2020-04-07 10:23:34 -07:00 committed by Facebook GitHub Bot
parent 9b69b1fc96
commit 4bfe50eed0
2 changed files with 5 additions and 2 deletions

View File

@ -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"

View File

@ -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