-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The phrase 1 -2 teaspoons of garlic powder (with a space between the 1 and -2 -- presumably intended to mean 1-2 as a range from one-to-two) parses with an empty ingredient name.
To Reproduce
>>> import ingreedypy
>>> c = ingreedypy.Ingreedy()
>>> c.parse('1 -2 teaspoons of garlic powder')
{'quantity': [{'unit': None, 'unit_type': None, 'amount': 1}], 'ingredient': None}Expected behavior
>>> import ingreedypy
>>> c = ingreedypy.Ingreedy()
>>> c.parse('1 -2 teaspoons of garlic powder')
{'quantity': [{'unit': 'teaspoon', 'unit_type': 'english', 'amount': 2}], 'ingredient': 'garlic powder'}(we don't yet support parsing a min/max range of values -- however, 2 is what is returned as the amount when the existing code parses 1-2 teaspoons of garlic powder, so the suggested expected output above seems least-divergent)
Screenshots
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working