No name parsed
Excellent library, thank you! (Using it for my daughter's startup idea :-)
came across a rare case of no name parsed, see below:
>>> pprint(parse_ingredient('2 pounds (16 to 20 count shrimp) 4 per person, peeled but with the tail on'))
ParsedIngredient(name=None,
size=None,
amount=[IngredientAmount(quantity=2.0,
quantity_max=2.0,
unit=<Unit('pound')>,
text='2 pounds',
confidence=0.999462,
APPROXIMATE=False,
SINGULAR=False,
RANGE=False,
MULTIPLIER=False)],
preparation=IngredientText(text='peeled but with the tail on',
confidence=0.999639),
comment=IngredientText(text='(16-20 count shrimp) 4 per '
'person',
confidence=0.813389),
sentence='2 pounds (16 to 20 count shrimp) 4 per person, '
'peeled but with the tail on')
Thanks for raising this. It looks like the punctuation in the sentence is causing shrimp to be mislabelled.
Would you mind sharing where the sentence came from (if it's from a website). This might be fixable by including more examples like this one in the training data.
The latest release beta 11 has some improvements to help with cases like this.
@strangetom sorry, completely missed your question, it came from foodnetwork
... and great job!! 👍