Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make brands a taxonomized field #5208

Open
Tracked by #8865 ...
stephanegigandet opened this issue May 6, 2021 · 11 comments · Fixed by #5227 · May be fixed by #6683
Open
Tracked by #8865 ...

Make brands a taxonomized field #5208

stephanegigandet opened this issue May 6, 2021 · 11 comments · Fixed by #5227 · May be fixed by #6683
Assignees
Labels
brands ✨ Feature Features or enhancements to Open Food Facts server 🎯 P1 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies

Comments

@stephanegigandet
Copy link
Contributor

stephanegigandet commented May 6, 2021

What

Primary use cases:

  • Canonicalize brand names that can be abbreviated/spelled in different ways (e.g. Marks&Spencer / Marks and Spencer, McCain / Mc Cain, St Mamet / Saint Mamet) to a unique id
  • Display properly capitalized / accented brand names in the /brands facet

Secondary use cases:

  • possibly add properties to brands
  • possibly make sub brands children of the parent brand (but only for brands, not owner companies etc.)

Part of

Screenshot

image

@stephanegigandet stephanegigandet added ✨ Feature Features or enhancements to Open Food Facts server 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies brands labels May 6, 2021
@stephanegigandet stephanegigandet self-assigned this May 6, 2021
@stephanegigandet
Copy link
Contributor Author

stephanegigandet commented May 6, 2021

Note:

  • this will change values returned in brands_tags (xx:some-brand instead of some-brand)

@teolemon
Copy link
Member

Mmh @stephanegigandet ? Wrong Bug

@teolemon teolemon reopened this May 12, 2021
@CharlesNepote
Copy link
Member

@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
Copy link
Contributor Author

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
Copy link
Contributor

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

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Aug 12, 2021
@aleene
Copy link
Contributor

aleene commented Apr 22, 2022

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
Copy link
Member

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

@aleene
Copy link
Contributor

aleene commented Apr 23, 2022

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),

@aleene aleene linked a pull request Apr 24, 2022 that will close this issue
@teolemon
Copy link
Member

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

@github-actions github-actions bot removed the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Jan 30, 2024
@stephanegigandet
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brands ✨ Feature Features or enhancements to Open Food Facts server 🎯 P1 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Projects
Status: To discuss and validate
5 participants