[EN NumberRange] "smaller 20" interpreted wrongly
Describe the bug "greater than 10 and smaller 20" is recognized as (10,20], but expected result is (10,20) in English language.
To Reproduce Add this test case to Specs\Number\English\NumberRangeModelExperimentalMode.json and run:
{
"Input": "greater than 10 and smaller 20",
"NotSupported": "javascript, python",
"Results": [
{
"Text": "greater than 10 and smaller 20",
"Start": 0,
"End": 29,
"TypeName": "numberrange",
"Resolution": {
"value": "(10,20)"
}
}
]
}
The test case fails. The actual Resolution value is (10,20]
Expected behavior The test case should pass.
Platform (please complete the following information):
- Platform: .NET
- Environment: source code, commit #fdee90fae3ceac501a11b13650a3da472bc9e53a
Additional context
Result for "greater than 10 and smaller than 20" is correct.
The LessOrEqualSuffix regex {((and|or)\s+(less|lower|smaller|fewer)((?!\s+than)|(\s+than(?!(\s*\d+)))))} doesn't cover "and smaller 20".
"smaller 20" doesn't make sense in English. The error here is that it should not return anything. Only for "greater than 10". "greater than 10 and smaller than 20" works correctly.
@tellarin Thanks for clarifying. Shall I close the issue or keep it open( in case you want to look into the "should not return anything" thing)? Please feel free to close it if you would like to.
@gooooloo Let's leave the issue. It's tagged as low priority for now. Thanks.