4

I'm build a recipe app/website, and I'm interested in how to properly classify the sections of an ingredient (as you would find in a cookbook or on a website) with regards to the terminology. Let me give an example of what I mean. Let's say an ingredient reads:

3 cups Ore-Ida southern-style hash browns

My best guess at terminology for the parts of this sentence fragment would be:

  • 3 = quantity
  • cups = unit
  • Ore-Ida = brand
  • southern-style = variation
  • hash browns = ingredient

I'm not sure if this is correct, or if there's a more precise descriptive term usage for this. I'm interested in learning the proper terminology if this is not considered to be correct.

One more thing worth noting is that in 99% of cases, there probably won't be a brand at all, or if there is, it's not of significance. In addition, if an ingredient doesn't include a unit, I'm making an assumption that the unit is "count", (e.g.: "3 eggs" would mean quantity "3", unit "count", ingredient "eggs").

Matt Huggins
  • 199
  • 1
  • 6
  • You say "parse" - are you actually asking about how to parse things, or just what to name the parts? And are you trying to know about everything? Notably, you've missed the really common case, "2 cups onion, chopped". – Cascabel Oct 19 '14 at 18:36
  • 1
    @Jefromi oh, c'mon... you could've kept to his example : "3 cups Ore-Ida southern-style hash browns, thawed". But if he's trying to do some sort of AI thing ... it's going to get messy when he finds "one small can of tomato paste", and has to know what size cans tomato paste typically comes in (relative to the time & place the recipe was written), and thus which is the 'small' one from the options. And then there's "one small onion, diced finely" – Joe Oct 19 '14 at 18:43
  • @Joe Sorry :( thought I'd go with a more common one. Anyway, yes, that's why I asked if this was supposed to be about parsing or just naming of parts (so that someone could enter it in a structured way). – Cascabel Oct 19 '14 at 18:44
  • The big thing you need to ask yourself is what measuring system (units) you're going to use. Unless you're specifically aiming towards a US audience, I would really recommend grams and milliliters. Forget cups; teaspoons and tablespoons are OK, but they're not completely consistent internationally. Plan on giving both Celsius and Fahrenheit temperatures. – Jolenealaska Oct 19 '14 at 18:55
  • I'm not posting as an answer because, to @Jefromi's point, I am not fully clear on what is being asked. This question (http://cooking.stackexchange.com/questions/14912/new-takes-on-recipe-format?rq=1) and the answers to it may be of some help. – Cindy Oct 19 '14 at 19:18
  • Just a note to amplify the comment from @Jolenealaska above - US audiences aside, for consistency in preparation and for scaling the number of servings up or down, it is probably best to avoid volumetric measures like cups for non-liquid measures. If you are simply trying to create a database that faithfully recreates specific quantities as expressed on (say) the back of a box, then never mind - but if you are trying to create a searchable scalable database, you should probably stick to weights for all ingredients except, perhaps, for water, butter, and milk. – Stephen Eure Oct 19 '14 at 19:27
  • @StephenEure : that's great if you're starting from scratch, but as he mentioned 'parse', it's possible that he's trying to take existing recipes and break them down into component bits. If you're trying to make a recipe reliably scale, then yes, use weights ... but then you're also excluded all of the people who don't have kitchen scales. – Joe Oct 19 '14 at 21:03
  • @Joe It's a pain (especially for scaling), but the best answer for an international readership is probably both. [King Arthur Flour](http://www.kingarthurflour.com/recipes/english-muffin-toasting-bread-recipe) does that on their website (toggle between grams, ounces and volume). I love that. – Jolenealaska Oct 19 '14 at 21:26
  • 2
    @Jefromi To clarify, I'm looking for what to name the parts, not how to parse them. Sorry for any confusion there. – Matt Huggins Oct 19 '14 at 21:30
  • 1
    @Jolenealaska : for a system that I maintain (not cooking related, but has units), we store two values -- the 'display value' which is what our source told us the units were, and an internal value that we use for all of our calculations (matching for searching, etc.). If you're going to convert recipies, it'd be a good idea to do something similar ... one value for scaling, but keep the original for display & provenance. – Joe Oct 19 '14 at 21:31
  • @MattHuggins : you should edit the question to clarify ... there are enough comments on this now that your clarification will get buried. – Joe Oct 19 '14 at 21:32
  • Good suggestion, I've edited the question. – Matt Huggins Oct 19 '14 at 21:37
  • Matt, what you're doing is my day job (cooking is only my hobby) and I can tell you that while it's a great thing to ask experts, you'll never get all the variations by just asking. The human mind is tuned to abstraction and thinking of the most common patterns it has seen, while for information architecture, you want to gather all the edge cases. If you want to do it right, you need recorded data as a source, not humans. Go out there, look through existing databases, cookbooks, blogs and your friends' notebooks with grandma's recipes, and gather all schemata you find. – rumtscho Oct 20 '14 at 06:36

2 Answers2

5

This is an exercise in data modeling, more so than cooking.
What you are describing is the design of your database.
You are on the right track.

You will want to consider how many of each of the fields you need to have. For example:

  • Quantity - Unique [there will be exactly one of these]
  • Quantity unit - Unique [exactly one]
  • Brand - Unique [optional] (either one or none)
  • Variation (or style, or preparation-note) - Non-unique [optional] (0, 1, or many)
  • Ingredient - Unique
  • Initial cooking temperature - Unique
  • I.c.t. Units - Unique
  • Preparation Instructions - (you have a decision whether to make one block text, or a series of fields which may or may not be used)
  • Cooking Instructions - (same as Prep. Instruction)
  • Cooling Instrutions... et cetera

ADDITIONAL:

To your question about when multiple modifiers might be used with an ingredient: You might have an ingredient which is expected to be prepared at the time of cooking. So: "minced onions, blanched". It would seem that order might be important to you here, as well. As you see here, there are two styles (I just realized 'modifier' might be a more all-encompassing field-name).

So you might typically see the descriptive nature of the ingredient listed like this (although maybe not the exact verbiage - I'm not sure if this exact ingredient has ever been listed). So you would have to make a decision as to whether you could have 0+ modifiers listed before the ingredient, format with a comma, then have 0+ commas after the ingredient.

Naturally the comma would only appear if there were >=1 modifiers listed after the ingredient.

Since I have thought about how infrequent you might see minced onions, blanched...you might instead see shredded red potatoes, salted and peppered. There are many considerations with respect to how modifiers could used, to be sure.

One more word - in database design, you'll want to take as much time as you can to develop pre-authoring/programming. Any minor change to the database schema could cause you to have to start all over again. :)

Jason P Sallinger
  • 2,021
  • 4
  • 26
  • 46
  • 2
    Add a bare minimum, add 'quantity qualifer' ('1 heaping tablespoon', '1 scant cup') ... but quantities aren't always one ... '1 cup + 1 TB' ... and then we get into '4 TB, divided' – Joe Oct 19 '14 at 20:59
  • 2
    Good points. My response is meant to invoke another way to think about the process. It isn't intended to be a final solution. – Jason P Sallinger Oct 19 '14 at 21:13
  • 2
    @JasonPSallinger - Thanks for helping to break it down. This is definitely what I'm looking for. Do you have an example of what an ingredient with "many" variations would look like? (Also, thanks to Joe for pointing out the qualifier.) – Matt Huggins Oct 19 '14 at 21:29
  • Sorry, but you are missing lots of cases here which are not "canonical", but very common in real-life recipes. To take quantity as an example: it can be zero (people just say "chocolate flakes", implying that you'll add as many as you want until your cake looks beautiful to you), one, or a range, such as "4-5 apples". Or an "or" phrase, as in "3 large or 4 small onions". And don't forget "salt, to taste", where there is no quantity at all. – rumtscho Oct 20 '14 at 06:32
3

Okay, to make this easier to digest, I'm going to do this is a whole w/ sub parts. Square brackets donote optional parts

Basic recipe:

  • <quantity> <ingredient>[, <preparation>][, "divided"]

Quantity:

  • ( <number> [<qualifier>] [<units>] )+

Ingredients:

  • [<brand-name>] [<preparation>] <item>

... now, you might notice that 'preparation' shows up twice. That's because sometimes the preparation comes before the measurement, and sometimes after:

  • 2 onions, diced
  • 1 cup diced onions
  • 10 cups spinich, sautéd
  • 1 cup cooked spinich

... I didn't go into details on 'preparation', as it's quite complex. (could be multiple steps, 'peeled and diced', or it could be qualified 'finely diced', '5mm slices')

Quantity may show up more than once (1 cup + 1TB).

"divided" is a note that the ingredient will be used in two different steps of preparation. Sometimes it'll be specified in the ingredient line ("2 TB + 1TB"), but not always.

update : bah, the update isn't quite the same as the comment ... because when you're dealing with what to call things, there are often multiple acceptable terms. For instance, 'quantity' could also be 'measurement'.

Joe
  • 78,818
  • 17
  • 154
  • 448
  • Great info, thank you! No worries on there being synonyms for what to call things, I'm just kind of looking for some kind of insight to make sure I'm considering everything and know how to organize everything when relating the data. :) – Matt Huggins Oct 20 '14 at 01:44