Describe the bug
Some STT engines hyphenate the day count (i.e. 3-day). This is not currently handled by extract_number(). Can remove the hyphen if it is there as a work around, but would be nice to cover this scenario natively.
Are there are scenarios where "{number}-{word}" should not be extracted as a number?
I'm also interested in whether this affects other languages.
To Reproduce
self.assertEqual(extract_number("give me the 2-day forecast"), 2)
self.assertEqual(extract_number("3-day cruise"), 3)
Expected behavior
Ability to extract numbers hyphenated to another word.
Describe the bug Some STT engines hyphenate the day count (i.e. 3-day). This is not currently handled by
extract_number()
. Can remove the hyphen if it is there as a work around, but would be nice to cover this scenario natively.Are there are scenarios where "{number}-{word}" should not be extracted as a number?
I'm also interested in whether this affects other languages.
To Reproduce
Expected behavior Ability to extract numbers hyphenated to another word.
Context Identified in: https://github.com/MycroftAI/skill-weather/pull/185