ingredients
ingredients copied to clipboard
Nutrition list parsed as ingredients
For the following recipe: https://www.bbcgoodfood.com/recipes/bacon-mushroom-risotto
The nutritions are returns (top) rather than the ingredients (left).
It also only gets half of the ingredients
Impressive work, though!
I have the same issue. The problem is parsing the lines wheres amounts and unit are not space-separated. For example, if the line contains 200 g, it will be parsed and gives the correct amount and unit. However, when line contains 200g (without space), this line will be ignored. this is why we are getting half of the list. I have reported this issue and I hope it will be fixed.
I have been implementing my own version, which is better able to find the ingredients list: https://cooking.rubenwardy.com/recipes/ Source code is MIT, and linked from that page.
It uses better heuristics to find the ingredients list, such as looking for headings like "Ingredients"
Known issues:
- Unable to parse
1/3
,1 1/2
or1 ½
. Single vulgar fractions, like½
, can be parsed however. - Usually misses ingredients if they are split into multiple sections, ie: per component of the meal.
- No ingredient normalisation (ie: doesn't convert "onion" and "onions" into a single form)
- No support for comments (ie: sliced)
- Doesn't do any NLP to detect complex phrases, including
or
andand
(ie: salt and pepper), and also more textual descriptions (ie: "a pinch of salt"). Ingredients doesn't do this either.