You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Python [1.0.2a2]
recognize_currency does not work for text like "negative $10". When tried recognize_number with some text that has both negative and $ sign, that divides the number wrong and fails to get all.
To Reproduce
from recognizers_suite import Culture, ModelResult
import recognizers_suite as Recognizers
culture = Culture.English
result_2 = Recognizers.recognize_number('negative $71.5 million or -$23.', culture)
print(
'Returns:\n',
json.dumps(
result_2,
default=lambda o: o.__dict__,
indent='\t',
ensure_ascii=False)
)
Best guess, that the functions does not work fine with word 'negative': i.e. I could get desired results from
"a negative impact on the strengthening of the $32" only if I place some brakets around word.
"a [negative] impact on the strengthening of the $32"
tellarin
changed the title
recognize_number with negative currency
[* Currency] Handle mentions in the form "negative <currency>"
Mar 18, 2023
tellarin
changed the title
[* Currency] Handle mentions in the form "negative <currency>"
[* Currency] Handle mentions in the forms "negative <currency>" or "-$<number>"
Mar 18, 2023
Platform: Python [1.0.2a2]
recognize_currency does not work for text like "negative $10". When tried recognize_number with some text that has both negative and $ sign, that divides the number wrong and fails to get all.
To Reproduce
Returns:
Expected behavior
values should be: -71500000, -23
The text was updated successfully, but these errors were encountered: