cd /news/structured-data/normalising-1291-cocktail-recipes-un… · home › topics › structured-data › article
[ARTICLE · art-179772] src=dev.to ↗ pub= topic=structured-data verified=true sentiment=↑ positive

Normalising 1,291 cocktail recipes: units, estimated ABV, and a set-intersection engine

A developer built cocktailsabc.com, a cocktail recipe site indexing 1,291 recipes across 12 languages, with the engineering focused on data normalisation rather than photography. The site stores one canonical metric measure per ingredient and renders ounce and centilitre conversions as derived values, computes per-drink ABV from ingredient volumes and strengths while labelling every figure as an estimate, and collapses loose glass and technique synonyms into a controlled vocabulary. A "My Bar" feature answers subset and single-missing checks over the catalogue as set operations, which the developer says only works because ingredient names like "sweet vermouth" and "red vermouth (sweet)" are canonicalised to one key first.

recommendation

Normalise units and collapse synonym variants into one canonical ingredient key before building set-intersection or subset queries, and mark every derived value such as estimated ABV as derived.

more in playbook: Retrieval and RAG
by read3 min views6 publishedDec 1, 2026

I built a cocktail site whose whole value is data quality, not photography: cocktailsabc.com. The public index is 1,291 recipes, each on its own page, and the interesting engineering is everything that has to be normalised before a "what can I actually make tonight?" query works. Here is what that turned into.

/, /es/, /de/, /fr/, /it/, /pt/, /nl/, /pl/, /sv/, /ja/, /tr/, /ar/), 2,522–2,594 URLs each, schema.org 110 in the Shade → Glass Highball, Technique Built in the glass, Strength 8% ABV (estimated), Difficulty Easy, Time 5 min.llms.txt file describes the corpus for AI crawlers ("1291 recipes, filterable by the bottles you already own … in 12 languages") because the alternative is a model guessing from prose. 1. Three unit systems in one column. Source recipes arrive in ounces, centilitres and millilitres; some in "parts", some in "splits", some in "fill with soda". A 1.5 oz row and a 45 ml row are the same quantity, and a 1 part row is meaningless without the total volume. The site therefore stores one canonical metric measure and renders the others as derived conversions, so every page shows ml, cl and oz for the same line. Text-only quantities ("fill with lager") are kept as text — inventing 120 ml for a "fill" is how you get a recipe that lies.

2. Strength is computed, then labelled as an estimate. ABV per drink is derived from the ingredient volumes and their strengths, which is why pages print e.g. 8%, 14.8% and 23.7% with "(estimated)" attached. The estimate is published as an estimate rather than rounded to a confident number, because the inputs for liqueurs and mixers are themselves ranges. Same discipline as pricing data: a derived number gets marked derived.

3. A controlled vocabulary you did not design. Glass and technique come from source sites that use loose synonyms — "rocks glass", "old fashioned glass", "tumbler". Index rows across the catalogue surface dozens of distinct glass labels before you collapse them into a small controlled set, and if you don't collapse them the filters are useless ("show me everything for a coupe" silently misses half the list).

"My Bar" answers two questions and both are set operations, not search:

Subset and single-missing checks over ~1,300 recipes are trivially fast only because ingredients were canonicalised first — "sweet vermouth", "sweet red vermouth" and "red vermouth (sweet)" must collapse to one key, or the subset test produces false negatives and the whole feature looks broken. The vocabulary work is the feature.

Normalize the unit of measure before you normalise the entity name — it forces you to notice which sources measure in volume and which in parts, and that distinction breaks a lot of naive matching. Mark every derived value as derived. Publish an index (llms.txt, one sitemap per locale) instead of making a crawler guess. And keep one canonical record set with translation as a rendering layer: the sitemap index lists 12 locale sitemaps (English 2,594 URLs, each other locale 2,522), so the recipe records are shared and only the presentation differs.

── more in #structured-data 4 stories · sorted by recency
── more on @cocktailsabc.com 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/normalising-1291-coc…] indexed:0 read:3min 2026-12-01 · —