Scale an ingredient list, in either language
scale_ingredientsRescale ingredient lists for any servings or factor in French or English, with kitchen-friendly rounding that keeps eggs whole and adjusts spoons and pinches realistically.
Instructions
Multiply a list of ingredient lines, in French, in English, or in a list holding both. Give either 'factor', or 'from_servings' and 'to_servings' and the factor is worked out from them. Quantities land where a kitchen can follow them: an egg stays whole because half of one is not something a cook takes out of the shell, while anything that pours, weighs or cuts can halve, a spoonful shrinks into the smaller spoon before it is rounded, and a pinch keeps whatever size a hand gives it while its count is multiplied. Every line comes back with 'scaling': 'scaled' when the arithmetic landed on the exact product, 'rounded' when something had to move for the line to stay usable, 'unscaled' when the line carries nothing to multiply. A rounded line says what it was rounded from and in which direction. No quantity is converted between measuring systems: grams stay grams and cups stay cups, because a conversion changes what the recipe said.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| factor | No | What to multiply by. Give exactly one of: 'factor', or both 'from_servings' and 'to_servings'. | |
| language | No | 'auto' reads each line on its own, which is what a list holding both languages needs. Name a language to read every line that way. | auto |
| ingredients | Yes | The lines as written, one ingredient each, such as '200 g de farine' or '3 eggs'. One line, not a whole recipe. | |
| to_servings | No | What it should serve. Give it with 'from_servings', and without 'factor'. | |
| from_servings | No | What the list serves now. Give it with 'to_servings', and without 'factor'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| factor | Yes | What every quantity was multiplied by. | |
| language | Yes | How the lines were read. | |
| ingredients | Yes | ||
| scaled_count | Yes | Lines whose arithmetic came out exact. | |
| rounded_count | Yes | Lines whose value moved to stay usable. | |
| unscaled_count | Yes | Lines carrying nothing that can be multiplied. |