openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
664 stars 392 forks source link

Make brands a taxonomized field #5208

Open stephanegigandet opened 3 years ago

stephanegigandet commented 3 years ago

What

Primary use cases:

Secondary use cases:

Part of

Screenshot

image

stephanegigandet commented 3 years ago

Note:

teolemon commented 3 years ago

Mmh @stephanegigandet ? Wrong Bug

CharlesNepote commented 3 years ago

@stephanegigandet I think brands have different issues than other taxonomies. I have listed many different cases you can read here: https://wiki.openfoodfacts.org/Brands I probably missed some others.

stephanegigandet commented 3 years ago

Thanks @CharlesNepote ! There are a couple of cases that won't be solved by using the taxonomy (e.g. 3 different brands with the exact same name like "Walkers", and brands containing commas). I think the taxonomy will help for almost all the other cases.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity.

aleene commented 2 years ago

What holds actions on this issue back at the moment?

I would propose to make start. And solve other issues that are encountered along the way. The start issue is the encoding in the taxonomy. Support in other places is secondary.

We can document it on Charles page. Let's define the basics there.

alexgarel commented 2 years ago

@aleene it could be interesting to link to wikidata from the start.

aleene commented 2 years ago

Agree we need to add the wikidata link as well. We could create entries in wikidata as well (I do it also for the ingredients),

teolemon commented 2 years ago
teolemon commented 1 year ago

Here's a wikidata query of all food brands that exist in Wikidata: https://w.wiki/7KMA

stephanegigandet commented 9 months ago

I think the "short term solution" described on https://wiki.openfoodfacts.org/Brands is trying to support too many use cases (like translating brands in various languages or even countries). It would be very complex to implement (we don't have support for language/country pairs in taxonomies right now), but more importantly I think that the use cases it would support (and force) are in most cases unneeded and unwanted.

I think the simplest solution is to make brands language-less, and use the xx: prefix for them. If a brand has a translated name, in some countries then we consider it to be a different brand. In a lot of cases the products sold under those translated names will be different.

For products that display the brand in only one language, we just record that brand, and we display it as-is.

For products that display brands in multiple languages (e.g. in countries with more than one language), we record those brands and we display all of them.

And that's it.

One advantage of that solution is that it will work for existing brands (for which we don't have languages) and will also be much simpler for users who can continue to edit or enter brands as they see them on the product.