Skip to content

Feature: Structured Ingredient Parsing #1

@nerdstep

Description

@nerdstep

Update the recipe parser to extract ingredient strings into structured components:

  • quantity (e.g. 1 1/2, 3, a pinch)
  • unit (e.g. cup, tbsp, g, clove, none)
  • ingredient or text (e.g. onions, chopped, flour, salt to taste)

Example

Input: "1 1/2 cups chopped onions"
Output:

{
  "quantity": "1 1/2",
  "unit": "cups",
  "text": "chopped onions"
}

Notes

  • Handle common edge cases: fractions, ranges (2–3 cloves), compound units (14 oz can), and optional descriptors (to taste, as needed).
  • Fallback gracefully if structure is unclear (e.g., store original string).
  • This will enable better filtering, measurement conversions, and nutrition integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions