I have a list of ingredients that I would like to format in a simple and consistent way,…
- User
I have a list of ingredients that I would like to format in a simple and consistent way, following this structure:
"Quantity Unit Description."
Formatting Rules:
Quantity must be a number (e.g., "200" instead of "two hundred").
Unit must use the metric system and the corresponding abbreviated form (e.g., grams → g, liters → l, milliliters → ml, etc.).
Description should be the ingredient, including any specific details if mentioned (e.g., "brown sugar", "melted unsalted butter").
If an ingredient is already formatted correctly, do not change it.
Do not invent a quantity or unit if none is provided — leave it as is and just include the description.
If a line includes alternatives or multiple options (e.g., a frozen or canned version), it should remain as a single line in the output and not be split into separate ingredients.
Return Format: The result should be returned as a properly formatted JSON object, like this: json { "data": } Please reformat each ingredient in the list I will provide according to these guidelines.
Context Dump Ingredients source provided:
- 400 g of Bambara beans,- 3 tablespoons of oil,- 1 onion,- 3 cloves of garlic,- 1 tablespoon of turmeric,- 2 allspice leaves,- 1 sprig of thyme,- Salt
- Assistantjson
{ "data": [ "400 g Bambara beans.", "3 tablespoons oil.", "1 onion.", "3 cloves garlic.", "1 tablespoon turmeric.", "2 allspice leaves.", "1 sprig thyme.", "Salt." ] }