CoolFace
Datasetpublic

omerfsahan/Restaurant_Menu_Ingredient_EU_Allergen_Dataset

Restaurant Menu Ingredient & EU Allergen Dataset This dataset was created to support the development of machine learning models and restaurant software systems for detecting the 14 EU food allergens from recipe ingredients. Data Source The dataset is primarily derived from RecipeNLG, a large-scale collection containing approximately 2.3 million recipes. A restaurant-oriented subset was selected to represent a wide range of menu items, including main dishes, soups… See the full description on the dataset page: https://huggingface.co/datasets/omerfsahan/Restaurant_Menu_Ingredient_EU_Allergen_Dataset.

sourceHugging Faceotherupdated 22d agoView on Hugging Face
0likes70downloads
Dataset Card

Restaurant Menu Ingredient & EU Allergen Dataset

This dataset was created to support the development of machine learning models and restaurant software systems for detecting the 14 EU food allergens from recipe ingredients.

Data Source

The dataset is primarily derived from RecipeNLG, a large-scale collection containing approximately 2.3 million recipes.

A restaurant-oriented subset was selected to represent a wide range of menu items, including main dishes, soups, salads, appetizers, mezze, desserts, bakery products, breads, pasta and noodles, meat and poultry dishes, fish and seafood, vegetarian and vegan dishes, breakfast foods, sauces, snacks, and beverages.

Duplicate or highly similar recipes were reduced where appropriate. Menu item names unsuitable for general restaurant use were also reviewed, cleaned, renamed, or removed.

Data Preparation

The original RecipeNLG ingredient descriptions often contain quantities, measurement units, package sizes, and preparation instructions.

A Gemini-based ingredient extraction pipeline was used to convert raw ingredient descriptions into cleaner ingredient identities.

For example:

2 cups shredded cheddar cheese

becomes:

cheddar cheese

The extraction process preserves the actual ingredient identity while separating:

  • —Main ingredients
  • —Optional ingredients
  • —Alternative ingredient groups

After ingredient cleaning, an initial allergen detection stage was performed using a deterministic NLP / regex-based rule system.

The system considered direct allergen ingredients as well as established compound foods such as soy sauce, mayonnaise, hummus, tahini, pesto, Worcestershire sauce, oyster sauce, and fish sauce.

False-positive cases such as coconut milk, oyster mushrooms, eggplant, and nutmeg were also considered.

Final Allergen Audit

The allergen labels were subsequently reviewed using the Gemini 3.5 Flash API.

The model was instructed to use culinary knowledge rather than simple keyword matching and to consider:

  • —Hidden allergens in compound ingredients
  • —Traditional food compositions
  • —Explicit allergen-free variants
  • —False-positive cases
  • —Ambiguous ingredients
  • —EU allergen definitions

When an allergen set was considered incorrect, the complete corrected allergen set was returned and applied to the dataset.

Because lupin was underrepresented in the original data, additional real and source-based lupin / chocho / tremoços recipes were added to ensure coverage of all 14 EU allergen classes.

EU 14 Allergen Labels

The dataset uses the following standardized labels:

text
gluten
crustaceans
eggs
fish
peanuts
soy
milk
tree_nuts
celery
mustard
sesame
sulphites
lupin
molluscs

## Dataset Columns

- **`recipe_id`** — Unique identifier for each recipe.
- **`title`** — Dish or menu item name.
- **`ingredients`** — Original raw ingredient list from the source.
- **`source`** — Original recipe source.
- **`link`** — Source URL when available.
- **`ingredients_clean`** — Cleaned main ingredient names with quantities, units, and preparation instructions removed.
- **`optional_ingredients`** — Ingredients explicitly marked as optional in the recipe.
- **`alternative_groups`** — Groups of ingredients that can be used as alternatives to one another.
- **`allergens_primary`** — EU 14 allergens detected from the primary ingredient configuration.
- **`allergens_all_possible`** — Broader allergen set that may include allergens introduced by optional or alternative ingredients.

The primary target used for allergen modeling in this project is **`allergens_primary`**.

Preparation Pipeline
RecipeNLG (~2.3M recipes)
        ↓
Restaurant-oriented recipe selection
        ↓
Duplicate reduction and menu-name cleaning
        ↓
Gemini-based ingredient extraction
        ↓
NLP / regex allergen detection
        ↓
Gemini 3.5 Flash final allergen audit
        ↓
Additional real lupin recipe coverage
        ↓
Final dataset
Dataset Statistics
Final dataset size: 55,658 recipes
EU allergen classes: 14
Unique recipe IDs: 55,658
Primary allergen target: allergens_primary
All 14 EU allergen classes are represented
Lupin-containing recipes: 38

More detailed allergen frequency statistics can be calculated directly from the released CSV.

Intended Uses

This dataset may be useful for:

Food allergen classification
Restaurant menu analysis
Ingredient understanding
Machine learning research
Restaurant management software
Menu intelligence systems
Multilingual menu and allergen applications
Safety Notice

Food allergen identification is safety-critical.

Although this dataset has undergone multiple automated validation stages, including deterministic rule-based detection and LLM-based auditing, it should not be treated as a substitute for verified manufacturer ingredient declarations, official allergen documentation, or professional food-safety procedures.

Ingredient formulations may vary by manufacturer, country, preparation method, and time. Production systems using this dataset should include additional validation and appropriate food-safety safeguards.

Credits

Original recipe data is primarily derived from RecipeNLG.

Dataset selection, restaurant-menu adaptation, ingredient extraction, ingredient normalization, allergen detection, validation, and final dataset preparation:

[Ömer Faruk ŞAHAN / Hugging Face omerfsahan]