Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
6
149
name_en
stringlengths
0
147
name_pl
stringlengths
0
55
name_de
stringlengths
0
66
name_fr
stringlengths
0
135
parents
listlengths
0
4
ancestor_path
stringlengths
0
420
context_hash
stringlengths
64
64
embedding
list
En:carambola
[ "en:tropical-fruits" ]
Plant-based foods and beverages > Plant-based foods > Fruits and vegetables based foods > Fruits based foods > Fruits > Tropical fruits
50eca745af4c43e0b2956af93bb3c4f75679b679ae7c98d01548f2d542f985a9
[ 0.04026300087571144, 0.000391999987186864, 0.0015780000248923898, 0.021640999242663383, -0.05317499861121178, -0.051134999841451645, 0.030558999627828598, 0.04972599819302559, -0.01268799975514412, -0.013135000132024288, 0.02758600004017353, -0.013737999834120274, -0.04381899908185005, 0.0...
at:schlosskaese
[ "en:austrian-cheeses", "en:cow-cheeses" ]
Cow cheeses | Dairies | Fermented foods > Fermented milk products > Cheeses > Austrian cheeses
ca919366c3da976ab60a3469e18e2ca7ca20792129b55d9a2eb93b1522300fe0
[ 0.04027999937534332, -0.008860000409185886, -0.0018710000440478325, 0.014793000183999538, -0.03840800002217293, 0.012938999570906162, 0.048569001257419586, 0.06480000168085098, -0.0025430000387132168, 0.03856699913740158, 0.05046100169420242, -0.009937000460922718, -0.03062400035560131, 0....
at:österkron
[ "en:austrian-cheeses", "en:blue-veined-cheeses" ]
Blue-veined cheeses | Dairies | Fermented foods > Fermented milk products > Cheeses > Austrian cheeses
645d72751b23934fb1e6f45b472e464af9f0e84b6dd1dab5d39d81c209f925b5
[ 0.038982000201940536, -0.013214999809861183, 0.0036609999369829893, 0.006907999981194735, -0.05673399940133095, 0.006130999885499477, 0.02851800061762333, 0.05275600031018257, -0.0035510000307112932, 0.03232400119304657, 0.03267600014805794, -0.015327000059187412, -0.010780000127851963, 0....
au:quargel
[ "en:austrian-cheeses", "en:cow-cheeses" ]
Cow cheeses | Dairies | Fermented foods > Fermented milk products > Cheeses > Austrian cheeses
dce9c09c0ef8f0838fce6c2d3214b24e12d173aa0a6c5f76221a669b2ed74ef6
[ 0.032611001282930374, -0.00227600010111928, -0.008369999937713146, 0.010843000374734402, -0.043501000851392746, 0.006717999931424856, 0.03789899870753288, 0.07218799740076065, -0.022995000705122948, 0.02525000087916851, 0.04612100124359131, -0.004991999827325344, -0.022419000044465065, -0....
be:крупеня
Krupnik
[ "en:soups" ]
Meals > Soups
6c13aca5923a80ca3c983cc60045b8bff23c866361da511a2c4a9bc4684cada8
[ -0.009833999909460545, 0.012972000055015087, -0.048788998275995255, -0.012175999581813812, -0.0757019966840744, -0.008279000408947468, 0.06345199793577194, -0.009221999906003475, -0.034318000078201294, -0.002128999913111329, 0.022359000518918037, 0.018371999263763428, -0.03622899949550629, ...
bg:cakap
[ "en:wines-from-bulgaria" ]
Beverages and beverages preparations > Beverages > Alcoholic beverages > Wines > Wines from Bulgaria
0bd223ab1c6ce0e00a1f931260a12999f60ea86f75323d0c5504d9880fd13010
[ 0.025265000760555267, 0.04710099846124649, -0.010746999643743038, 0.014352000318467617, -0.048062000423669815, -0.017943000420928, 0.030083000659942627, 0.03002999909222126, 0.019807999953627586, 0.029662000015378, 0.015946999192237854, 0.007722000125795603, -0.03355100005865097, 0.0316429...
bg:sirene
[ "en:cheeses" ]
Dairies | Fermented foods > Fermented milk products > Cheeses
0ddeca39ace1795e4c77e3f58ea8c5c890c31ad3700076202558aca335c1d9f0
[ 0.027931999415159225, 0.027665000408887863, -0.0022619999945163727, 0.017702000215649605, -0.018438000231981277, -0.0002969999914057553, 0.0003229999856557697, 0.05811399966478348, 0.002423000056296587, 0.030251000076532364, 0.03512199968099594, -0.016174999997019768, -0.0549749992787838, ...
bg:аматричана
Sauce tomate à la pancetta
[ "en:meat-based-pasta-sauces" ]
Condiments > Sauces > Pasta sauces | Meats and their products > Meat-based sauces > Meat-based pasta sauces
e38c751fe0dbce62fcecc209cf74c356ffcdadb0709decbae52a486a774bd42d
[ 0.05754699930548668, 0.026684999465942383, -0.05657700076699257, 0.05327000096440315, -0.002767999889329076, -0.026325000450015068, 0.02725999988615513, 0.07825099676847458, 0.0059830001555383205, -0.015223000198602676, 0.008570999838411808, 0.03754200041294098, -0.003619000082835555, -0.0...
bg:асеновград
Asenovgrad
[ "en:wines-from-bulgaria" ]
Beverages and beverages preparations > Beverages > Alcoholic beverages > Wines > Wines from Bulgaria
37e0206f2c219207b7d7cdcba9decf75ab06765467f3bc66989142703a2436ad
[ 0.04139700159430504, 0.046633001416921616, -0.011309999972581863, 0.00698600010946393, -0.042281001806259155, -0.04983700066804886, 0.009472000412642956, 0.027063999325037003, 0.022299999371170998, 0.028145000338554382, 0.029983000829815865, 0.012261000461876392, -0.049139998853206635, 0.0...
bg:болярово
[ "en:wines-from-bulgaria" ]
"Beverages and beverages preparations > Beverages > Alcoholic beverages > Wines > Wines from Bulgari(...TRUNCATED)
ecf0e1ec1f16b89fadedfe1227484f92708e2f50b3fca65edd9acf8313ab3ad7
[0.02412099950015545,0.03520499914884567,0.0028280001133680344,0.011417999863624573,-0.0428190007805(...TRUNCATED)
End of preview. Expand in Data Studio

Open Food Facts Categories with bge-m3 Embeddings

A flat, embedded version of the Open Food Facts category taxonomy. Each row is one OFF category with multilingual display names, its full ancestor path, and a 1024-dimensional embedding produced by BAAI/bge-m3.

The intent is to let downstream projects do retrieval over OFF categories without having to re-fetch categories.json, walk the parent graph, or run the embedding model.

Source project

Generated by BetterCategories / offcat, a small Go service that does natural-language food category search backed by this exact table.

Schema

Column Type Notes
id string OFF category id, e.g. en:apple-juices. Primary key.
name_en string (nullable) English display name.
name_pl string (nullable) Polish display name.
name_de string (nullable) German display name.
name_fr string (nullable) French display name.
parents list Direct parent category ids.
ancestor_path string (nullable) Pre-computed flattened ancestor chain used as embedding context.
context_hash string (nullable) SHA-256 of the text fed to the embedding model. Useful for diffs.
embedding list[1024] bge-m3 embedding of name_en + " > " + ancestor_path (cosine).

Row count: 14352.

Embedding details

  • Model: BAAI/bge-m3 (served via an OpenAI-compatible local API in the upstream project; any deployment of the same model produces compatible vectors).
  • Dimension: 1024.
  • Distance: cosine similarity is the intended metric.
  • Input text: the English category name concatenated with " > " and the flattened ancestor path. See taxonomy.go in the source project for the exact embedTextFor formatting.

Quick start

import pyarrow.parquet as pq
import numpy as np

table = pq.read_table("off-categories-bge-m3.parquet")
df = table.to_pandas()

mat = np.stack(df["embedding"].to_numpy())  # (14352, 1024)
mat /= np.linalg.norm(mat, axis=1, keepdims=True)

# encode a query with bge-m3, normalise, then:
# scores = mat @ query_vec

For Postgres users, the same data is what BetterCategories writes into a pgvector vector(1024) column with an HNSW cosine-ops index.

Licence and attribution

This dataset is a derivative database of Open Food Facts and is therefore distributed under the Open Database License (ODbL) v1.0, the same licence as the upstream taxonomy.

  • Upstream data: Open Food Facts, https://world.openfoodfacts.org/data, ODbL-1.0.
  • Modifications applied: parent graph flattened into an ancestor_path string per category; bge-m3 embeddings computed over the concatenation of the English name and that ancestor path; rows with no embedding are excluded.

If you redistribute this dataset or a derivative of it (including dumps, indexes, or further-trained models that incorporate the data), you must:

  1. Keep the resulting database under ODbL-1.0.
  2. Credit Open Food Facts contributors.
  3. Note that the data has been modified.

The Go source code that produced this dataset is licensed under MIT and is not covered by ODbL.

Downloads last month
21