Methodology

Data & Methodology

How Beer Check identifies a beer, which sources it consults, and how each dietary verdict is determined.

Barnivore

Vegan / vegetarian status

Open Food Facts

Allergens & dietary tags

Tesseract / OCR.space

Label text extraction

ZXing

Barcode decoding

coeliacslikebeer.co.uk

100% GF brewery list

Check a beer

Processing pipeline

Three input methods — all converge on the same multi-source dietary lookup. They differ only in how the beer is identified.

Label photo

AI-powered OCR pipeline

1

Image upload & cache check

The photo is received as a multipart upload. The backend hashes the image and checks its cache — if the same image was seen recently, the stored result is returned immediately.

2

Three-stage OCR extraction

  1. Tesseract OCR — local open-source engine; primary extractor.
  2. OCR.space — cloud API fallback when Tesseract confidence < 0.85.
  3. Google Cloud Vision — high-accuracy fallback when configured.
3

Fuzzy catalog matching

Extracted text is cleaned and token-matched against the beer catalog using Jaro-Winkler similarity. The highest-scoring match above the 60% threshold is selected.

4

Multi-source dietary lookup

The matched beer feeds into the priority-ordered lookup chain (see Dietary verdicts below). The result is cached against the image hash.

Barcode scan

EAN / UPC lookup

1

ZXing decode

ZXing decodes the EAN-13, EAN-8, UPC-A, UPC-E, CODE-128, or QR Code from the uploaded image.

2

Open Food Facts lookup

The EAN/UPC is looked up in OFf. Allergen tags and dietary labels are extracted directly. UPC Item DB is used as an optional fallback.

3

Barnivore supplement

The OFf product name is also sent to Barnivore to fill any missing vegan / vegetarian status.

Name search

Fastest, most reliable path

1

Catalog match

The submitted name (and optional brewery) is fuzzy-matched against the catalog. A brewery name acts as a secondary filter to improve precision. Threshold: 60%.

2

Multi-source dietary lookup

The matched beer goes straight into the same priority-ordered lookup chain as the OCR path — no image processing required.

Dietary verdicts

Sources are consulted in priority order — the first definitive result wins.

Vegan & vegetarian

1

Barnivore

Has a status entry → Use Barnivore verdict

2

Open Food Facts tags

Vegan / vegetarian label present → Use OFf label

3

OFf allergen inference

Allergens present, none animal-derived → 'Possibly suitable'

4

Cask inference

Identified cask ale, no explicit status → 'Unknown — isinglass risk'

5

No data

No result from above → 'Unknown'

Barnivore verdicts may reflect a specific format (keg/bottle). Read the full entry for nuance. Cask ale guide →

Gluten-free verdict

1

OFf explicit GF label

Tagged 'en:gluten-free' → Gluten-free (high confidence)

2

OFf allergen tags

Allergens present, no wheat/gluten → Possibly GF (medium confidence)

3

100% GF Brewery list

Brewery confirmed 100% GF → GF — entire range confirmed

Empty allergens ≠ gluten-free. Only an explicit tag or a confirmed GF brewery provides strong assurance. 100% GF breweries →

Other allergens

Allergen data — gluten, wheat, barley, fish, milk, nuts, soya, sulphites, and others — comes directly from Open Food Facts. OFf normalises tags to the EU list of 14 major allergens under Regulation 1169/2011.

For barcode lookups, allergens come straight from the OFf API response. For OCR and name-search lookups, they are fetched from the matched product record — or left empty if OFf has no entry.

Caveat

OFf allergen data is community-contributed and varies widely. A blank allergens section means no data was recorded — not that the product is allergen-free. Beer is also exempt from full ingredient labelling in many jurisdictions, so even official OFf entries may be incomplete.

Confidence scores

The score (0–100%) reflects how closely the detected beer name matched a catalog entry — not how accurate the dietary data is.

80 – 100%

Strong match

Text closely matched a single catalog entry. Generally reliable for well-known beers with complete database coverage.

60 – 79%

Likely match

Partial match. Beer was probably identified correctly, but enough ambiguity exists that a different beer could match. Try name search to confirm.

Below 60%

Low confidence

Catalog match failed threshold. System falls back to a direct Barnivore search on the raw OCR text. Results here are less reliable.

Cask ale caveats

Isinglass finings

Traditional cask ales are commonly fined with isinglass — dried fish swim bladders — making them not suitable for vegetarians or vegans regardless of what the label says. Fining agents are not required to be declared.

Why Beer Check cannot tell

Database entries rarely distinguish cask from keg/bottle, and OCR cannot determine the dispense method from label text. If ordering from a handpull, check with the bar or brewery directly.

Full guide to cask ales and finings →