9 ms·
This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything appr
by oneeyedpigeon 9y ago
This really seems to be an exercise in 'structuring recipe data' rather than the ins-and-outs of scraping. Seems like a much-needed task; is there anything approaching a 'standard' for recipe data already?
"ingredients": [
"600g pineapple, peeled, chopped"
]
This seems like a prime candidate for improvement; something like the following would seem to be more useful:
"ingredients": [{
"ingredient": "pineapple",
"quantity": {
"value": 600
"unit": "g",
},
"preparation": [ "peeled", "chopped" ]
}]
Using this kind of data, I can imagine automated ordering, management of several planned recipes in conjunction, personalised timing estimations, etc. I think the whole field of cooking is ripe for some quality api-based disruption!
- Freak_NL 9y agoWhenever I read a recipe online I get this nagging feeling that there should be some widely used open standard for describing recipes that can do all sorts of awesome stuff (like a web crawler such as DuckDuckGo being able to answer "I have a pineapple, cream, and the usual pantry basics, what can I cook?"), but this seems to go directly against the business models of the big recipe sites, so it will not likely see much uptake.
- philbarr 9y agoI thought once about doing a "flavour graph" where people could go on and add what they thought were good flavours to mix together. The more people added the same flavours, the stronger the edges between nodes would get. I'd probably have to separate it somehow by geographic region, as tastes vary, but in the end you should have a good approximation of "what goes with what".
- blackskad 9y agoThere's a Belgian startup that matches flavors with a scientific method. https://www.foodpairing.com/en/home https://www.foodpairing.com/en/home
- deleted 9y ago[deleted]
- flashman 9y agoIt's not the same as "what foods go together" but here's a "related flavours" graph I did using research on foods with similar flavour compounds: https://twitter.com/flashman/status/878516648394633216 https://twitter.com/flashman/status/878516648394633216
- benyami 9y agoThe Flavor Bible is a published book version of what you're describing.
- rocannon 9y agoTry IBM's Chef Watson: https://www.ibmchefwatson.com/tupler https://www.ibmchefwatson.com/tupler
- arthurpaul 9y agohttp://schema.org/Recipe http://schema.org/Recipe
- roryisok 9y agoThere are two ingredient / recipe search engines that work like this Recipepuppy.com Foodpairing.ninja
- lprubin 9y agohttp://www.supercook.com http://www.supercook.com (Enter ingredients, get recipes)
- madamelic 9y agoCheck out PantryPlan: https://pantryplan.io https://pantryplan.io. It does exactly that and not just meal-by-meal but entire menus. Disclaimer: I made it. :) Let me know your thoughts.
- simooooo 9y agoMyFitnessPal has the same issue where the quantity values mixed between different units, but also between volume(cup) vs weight(grams). So its a pain in the neck to know how heavy a cup of pasta is. I can see the same issue arising with this tool.
- cbcoutinho 9y agoThat's the beauty of 'user-generated content'. You can scan whatever you want, and if it's not in their system you can just put the details in yourself. That includes choosing what a portion is
- Ariana454 9y agoI have created $18376 in one month by merely doing simple on-line work from home. everybody needs to become loaded presently and wishes to live a life that we've an inclination to ascertain in barely dreams. This job can fulfil your dreams just like ME. everybody ought to do that job presently and start earning from home directly. merely open this electronic computer in your browser by copy and paste then follow the instruction to urge started presently...... « Back ⇝⇝⇝http://www.joinmate2.com http://www.joinmate2.com
- Freak_NL 9y agoFor a lot of the basics (flour, sugar, rice, etc.) conversion formulas/tables exist, but I've found that if you use recipes from around the globe, it's much easier to just have measuring utensils for cups/spoons (US cooking volume units) alongside the standard metric volume measures and scales in your kitchen.
- Semaphor 9y agoAt least some of MFPs ("verified") raw ingredient don't seem to use those though. 100g of Avocados, for example, can easily have several thousands of kcal according to them.
- unwind 9y agoA cup of pasta doesn't even compute, since the mass of the pasta will depend so much on the exact shape in question. You can't substitute a cup of dried tagliatelle (huge "balls of yarn") for a cup of risoni (rice-sized grains of pasta) and be happy after eating that meal. :)
- ygra 9y agoWhat I'm missing the most in this context is for how many people those ingredients actually are. That's necessary if you want to scale the recipe to fewer or more people.
- oneeyedpigeon 9y agoYes. As someone with limited cooking skills, I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2'; I'm not sure if it's possible to define a simple formula for how different ingredients scale, nor whether that would need to take into account other ingredients, etc. Would be interesting to see quite how 'algorithmic' cooking can get!
- Freak_NL 9y ago> I don't think it's quite as simple as 'double quantities of everything to serve 4 people instead of 2' It usually is though. Cooking times however don't tend to scale predictably (except for microwaves).
- SeanDav 9y ago> "It usually is though. Cooking times however don't tend to scale predictably (except for microwaves)." Not sure I agree. In my very limited experience, I have found that cooking times for microwaves do not scale predictably. For example warming up 2 packs of something seems to use less than double the amount of time for 1. I have had issues in the past of doubling or tripling the cooking time for double/triple the quantity and having food overcooked.
- semi-extrinsic 9y ago> warming up 2 packs of something seems to use less than double the amount of time for 1 This makes sense. When you see a microwave rated as 750 W, that's assuming there is a sufficient load inside the oven that can absorb all that RF energy. Usually there's not, maybe your food can just absorb 400 W, and when you double the amount of food maybe it can absorb 600 W. Mainly this is because the outer ~3 cm of food is what absorbs RF energy, heating of the rest of the food is through thermal conduction.
- Jaruzel 9y agoThere is a standard of sorts, if you trust Google: https://developers.google.com/search/docs/data-types/recipes https://developers.google.com/search/docs/data-types/recipes
- blackskad 9y agoThis standard is not unique to Google. It's part of the Schema.org initiative to add semantics to the web. The full definition is here: http://schema.org/Recipe http://schema.org/Recipe The biggest problem with it, imho, is the lack of a proper definition of ingredients. An ingredient is just a plain string containing the unit, amount and name and sometimes an extra note. Having a quadruple instead of a string would make this standard a lot more useful.
- soneil 9y agoI was surprised to find that bbc.co.uk/food uses the Recipe schema. Made scraping it much easier when there was some talk about canning it a couple of years back.
- peteretep 9y ago> I was surprised to find that > bbc.co.uk/food uses the Recipe > schema Gotta say, having worked at the Beeb, this doesn't surprise me at all. Amazing what marginal-value technical itches can be scratched when commercial pressure is eased off...
- askvictor 9y agoTwo things that would be so nice would be easy scaling, and unit conversion (even better if that's automatic)
- JepZ 9y agoWell, as surprising as it might sound there seem to be many units in the kitchen which are not so easy to convert. One example: How many milliliters does a table spoon have? Google says 14.7868 (american table spoon). I have read from 6 to 25... I mean the problem is that the people who writes those recipes use different definitions of the same unit. And that is just one example. How should you convert units which are so different between different authors?
- Freak_NL 9y ago1 US customary table spoon (~14.8ml) is conventionally taken as 15ml, a teaspoon as 5ml, a cup as 240ml. That's roughly what you get when you buy a set of measuring spoons/cups as well; some may be a tad smaller (following the US measurements), and some are aligned with these metric values — the difference is mostly negligible. These are quite standardised unless you are using something like Australian tablespoons¹ (but then any American following that recipe would run into problems as well). The US customary cup and spoon measures were introduced exactly to solve the problem of measurement ambiguity in recipes! Nineteenth century cookbooks can be hard to follow because of the significant variation in the interpretation of smidgens, dashes, pinches, and (then) spoons and cups. 1: Are these really a thing? Any Australian care to chime in?
- askvictor 9y agoI'm Australian, a 'standard' tablespoon is 20ml, but recipes sometimes use 25. Not sure about the rest of the world. It probably doesn't actually matter too much for most recipes; the ones that need that level of accuracy tend to specify weights.
- svnv 9y agoI created http://www.recipastely.com/ http://www.recipastely.com/ to simplify recipe conversion between us and iso units a few years back. It's not perfect but it seems to work fine for me.
- kozhevnikov 9y agoBack when microformats were all the rage there was h-recipe http://microformats.org/wiki/hrecipe http://microformats.org/wiki/hrecipe
- patrickdavey 9y agoHeh, I once tried to make a DSL to cope with recipes from cookingforengineers.com e.g. their lovely recipe cards [1] . I totally failed to make anything decent!. The combining of multiple steps etc. was just painful!. In the linked site above, that recipe is so straight forward, I'd love to see how it copes with [1] below. [1] http://www.cookingforengineers.com/recipe/127/Shepherds-Pie-Cottage-Pie/trn http://www.cookingforengineers.com/recipe/127/Shepherds-Pie-...
- mosselman 9y agoThose cards are genius. They perfectly illustrate what you can do parallel to other things rather than having to re-read and re-interpret the written instructions continuously.
- enobrev 9y agoI'm a fan of his recipe card as well, though I convert it to a standard recipe for sharing with friends who don't see the format in the same light. Also, a friend and I made enough of his Mac and Cheese[1] to serve 150 people at my wedding a couple years ago. Highly recommended. 1: http://www.cookingforengineers.com/recipe/230/Macaroni-and-Cheese-Bake http://www.cookingforengineers.com/recipe/230/Macaroni-and-C...
- mosselman 9y agoLooks great. I will give a recipe cards like this a try someday with actual cooking. Looking forward to experimenting with the format.
- g4k 9y agoThat is actually a great visualization for recipes and cooking instructions.
- tkp 9y agoA nice use-case seen on the recipe website "Marmiton" is a widget to ajust ingredients quantity to the target number of eaters. You can see it here[1] for example, "Ingrédients / Nombre de personnes", lower in the right column. [1] http://www.marmiton.org/recettes/recette_courgettes-farcies-thon-et-moutarde_337214.aspx http://www.marmiton.org/recettes/recette_courgettes-farcies-...
- germanier 9y agoThis implementation looks better than the ones commonly found on German recipe sites. As soon as you start adjusting they show you "3/8 pinches of salt" or "5/6 eggs".
- tinebak 9y agoI made a recipe scraper that doesn't look at the structured (schema) data, but instead "reads" the whole page to detect the recipe. I found that there are too many recipe sites that don't use the schema rules including, of course, recipes from Facebook posts and emails. Users have used it to copy recipes into their recipe boxes from more than 70,000 different websites. There are a lot of different formats out there!
- agotterer 9y agoCan you share a link?
- tinebak 9y agoHappy to! http://www.copymethat.com http://www.copymethat.com
- pjc50 9y agoNice :) Is there some artefact of the sorting that puts only pizza recipes on the front page?
- tinebak 9y agoThat's funny! I'm not seeing any pizza recipes now. It shows the latest shared recipes that have images. There are trends, though. One person wrote and complained that vegans were taking over the website, but the next day the Community was back to having lots of meat. The app got a bad review in the app store because this person said that Copy Me That was always showing pot recipes!
- k3oni 9y agoWell not sure what it might be, but as the previous poster got pizza all over i'm into salmon apparently, in 2 pages and 95% recipes are all about salmon :)
- cronin101 9y agoI once hacked together some very basic code to try and do this, so that I could answer the question "what can I make with the stuff in my refrigerator". I gave up on the project pretty quickly (now I'm really tempted to pick it up again), but you can definitely get 90% of the way there with 10% of the effort: ingredients = [ '200g of heavily salted butter', 'six bottles of beer', '50ml of clotted cream', 'plain brown flour', '1 oz french cheese', '8 large eggs', '2kg of salted pork', 'a pinch of salt', 'a tablespoon of honey' ] ingredients.map { |i| IngredientParser.parse i } # => ["butter", # "beer", # "clotted cream", # "flour", # "cheese", # "egg", # "pork", # "salt", # "honey"] https://github.com/cronin101/DataChef/blob/master/utils/ingredient_parser.rb https://github.com/cronin101/DataChef/blob/master/utils/ingr... require '../environment.rb' require '../scrapers/bbc_good_food_scraper.rb' recipe = Recipe.create source_uri: 'http://www.bbcgoodfood.com/recipes/vietnamese-caramel-trout' recipe.update_using_scraper BBCGoodFoodScraper puts recipe.title puts recipe.description puts recipe.ingredient_ids.inspect recipe.ingredient_ids.each { |i| puts((Ingredient.find i).inspect) } =begin Vietnamese caramel trout A caramel base balances out the hot and salty ingredients of this Asian-inspired one-pan fish dish for two [56, 57, 58, 59, 60, 61, 62, 63, 64] #<Ingredient id: 56, name: "caster sugar", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 57, name: "thai fish sauce", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 58, name: "red chilli", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 59, name: "ginger", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 60, name: "rainbow trout", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 61, name: "bok choi", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 62, name: "juice lemon", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 63, name: "coriander", recipe_frequency: 1, recipe_ids: [7]> #<Ingredient id: 64, name: "rice", recipe_frequency: 1, recipe_ids: [7]> =end
- tinebak 9y agoI'm working on this and finding that it's a lot of work (and code) to identify the actual ingredient. Consider "all-purpose sifted flour." That's the same ingredient as "plain flour." So (so!) many ways to write the same ingredient. I'm getting there, though :)
- pjc50 9y agoNote that industrially this already exists - the EPOS company I work for has quite a sophisticated recipe, stock control and re-ordering solution. In that context, one important thing to handle is variations ("no cheese" etc)
- lpasselin 9y agoYes, this one is the most used http://microformats.org/wiki/h-recipe http://microformats.org/wiki/h-recipe
- rojobuffalo 9y agoThis is something I'm working on. I started with a nutrition graph with endpoints for individual foods, units of measure (with mass conversion for volumetric and common units), physical changes (cutting, blending), chemical changes (cooking, fermenting), and nutrient stats. It's designed as the backend to an NLP interface for describing your recent eating. A food selection composes those endpoints I mentioned; and a recipe is a preset group of food selections. I'm not sure if that's how it should be long-term or how recipe discovery will work, but the goal is an agent that you can talk to about your nutrition intake, food buying, and cooking.
- pdimitar 9y agoIs your repository public and/or are you willing to share? I am not looking to make this into a business myself but as a guy who is very frustrated that he can't properly organize his diet, I really want to use something like this. Hell, if it can be improved to be usable enough and to partially replace a personal nutritionist, one might sell access to it one day.
- rojobuffalo 9y agoThe plan is to put out an alpha release this month. In the meantime you might check out https://www.eatthismuch.com/ https://www.eatthismuch.com/. I'm not that experienced with databases; so exposing the design might be unwise from a security perspective. I'm warm to the idea of open sourcing in the future though. I've only shared repo access with a few trusted engineers. If you think you might want to contribute, hmu ryan at terra dot farm.
- pdimitar 9y agoUnfortunately I am way too busy lately and I feel I would only leech and not contribute, so better keep me out for now. I have a very keen interest in the area however! What is most interesting for me recently is how exactly is such data represented in computer structures? Since I know that drawing example graphs and giving good examples would swallow huge amounts of time, I asked if the code is open-source so I could reverse-engineer the data model myself and not pester anyone. =) I fully understand you not wanting to OSS it yet. I'll be extremely interested if you do that one day in the future.
- mikepurvis 9y agoI tried to build a little recipe DB along these lines years ago. What I ended up finding is that as I improved in my own food preparation skills, my interest in super-rigid recipes of this form diminished. Basically, there's just a lot of slush and room for experimentation in cooking. Think about making a stir fry— how many people would level off exact masses of different vegetables to combine in perfect proportion? Never! You toss in what looks good and that's that. As you gain confidence, this approach spreads out to cover marinades, sauces, salads, breads, baking, etc, etc. You're not looking at recipes because you intend to follow them exactly, but because you're trolling for ideas of new combinations, or new preparation methods, or whatever. The prose is valuable, because that's where that subtlety is communicated. It's the author saying stuff like: "I know this sounds weird, but do X until Y and then gently add Z and you'll be surprised what a great flavour develops." Authors like Mark Bittman and Deb Perelman are perfect examples of this. Sure, you might make the odd thing from them exactly as written, but that's not really why you're there. I think treating food preparation as equivalent to a Vagrantfile would really lose something along the way.
- zaque1213 9y agoMark Bittman was the second biggest influencer of the way I prepare food. The first was a college roommate, who literally improvised everything he cooked, as far as ingredients and proportions go, and it tasted amazing every time. It opened my eyes to how subjective cooking can be. I tried Blue Apron once. So boring.
- greglindahl 9y agoMark Bittman is one of the people behind Purple Carrot.
- nkrisc 9y agoI 100% agree with you. Perhaps this kind of structure would be better suited to baking recipes? This sort of precision (amounts, timing, even order of ingredients) can be very important when baking.
- 9y ago
- coherentpony 9y agoThis is only part of the problem. The second part is the instructions. It's not clear to me what the best way to present the second part is.
- craptocurrency 9y agoLong forgotten Microformats is the way to go.