Show HN: A recipe parser to get rid of the cruft. I need you to break it I made a recipe parser to get rid of all the cruft on recipes. Check it out: https://ift.tt/Wjq3pHr Has this been done? Yes. Does this project use AI? Also yes...but barely. What it does do is grab various forms of metadata that recipe sites often provide for SEO reasons (as per schema.org Recipe spec). It's commonly ld+json, but can be other formats as well. The trick is this: What the numerous recipe sites output is not always the same - there are many variations of the schema.org specs used for Recipes, so this project attempts to correct for that. It's just a bunch of conditionals. If all else fails, it uses AI as a fallback to parse a recipe and return valid ld+json Recipe data based on Schema.org's Recipe spec. I even say "please" to the AI overlords. If a request for a recipe seems to take a long time, you'll know it's pinging OpenAI's API (the Chat API via the 3.5-turbo model). I'd love to see if you can find a recipe that breaks it! May 23, 2023 at 06:29AM
Comments
Post a Comment