parseIngredientLine
Parse an ingredient line into structured quantity, unit, ingredient, and preparation note, flagging ambiguous descriptors instead of resolving them.
Instructions
Split one ingredient line into quantity, unit, ingredient and preparation note. Reports what is ambiguous instead of resolving it: '1 medium onion' comes back flagged as a size descriptor, never as a weight in grams.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | Yes | ||
| name | Yes | ||
| unit | Yes | Normalized unit id such as 'tablespoon'. Null for bare counts. | |
| unitRaw | Yes | ||
| quantity | Yes | ||
| confidence | Yes | ||
| ambiguities | Yes | ||
| preparation | Yes | Text after the first comma, such as 'diced'. | |
| quantityMax | Yes | Upper bound when the line gives a range. | |
| isGroupHeader | Yes | ||
| sizeDescriptor | Yes | Words like 'medium' or 'large'. Reported, never converted to grams. |