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

Tag rules: Tag A + Tab B = Tag C #3426

Open
stephanegigandet opened this issue May 14, 2020 · 5 comments
Open

Tag rules: Tag A + Tab B = Tag C #3426

stephanegigandet opened this issue May 14, 2020 · 5 comments
Labels
automatic-data-augmentation Can be done by Robotoff categories 🎯 P1 ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. ⭐ top issue Top issue. Tags.pm 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies

Comments

@stephanegigandet
Copy link
Contributor

stephanegigandet commented May 14, 2020

What

Following a discussion on how we can apply finer categories to products (e.g. Yogurts with fruits, Artificially sweetened yogurts instead of just Yogurts) massively to products, we have discussed introducing a new feature to automatically apply some categories when products have specific tags.

For instance, we could have rules like:

+categories:en:yogurts +ingredients:en:sweetener = +categories:en:artificially-sweetened-yogurts

+categories:en:yogurts +ingredients:en:sugar -ingredients:en:sweetener = +categories:en:sugared-yogurts (yogurts with sugar in the ingredients but without sweeteners)

We could create a testing tool to display which products would be affected by a rule we want to test.
And we could then automatically apply validated rules, either in real-time, or periodically (which would have the advantage of cleanly attributing new tags to the tag rules instead of to users).

Part of

@stephanegigandet stephanegigandet added ✨ Feature Features or enhancements to Open Food Facts server 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies categories Tags.pm labels May 14, 2020
@bernardlemoullec
Copy link
Contributor

Good idea! Thank you Stéphane

@teolemon
Copy link
Member

teolemon commented May 14, 2021

+categories:fr:Sancerre = origins_of_ingredients:en:France + labels:fr:aoc
+packager-codes:msc-* = labels:en:msc
+brands:fr:carrefour = +stores:fr:carrefour
+brands:fr:sefi'BIO = +labels:en:organic

@teolemon
Copy link
Member

teolemon commented Aug 26, 2021

  • Closely related to our initial discussion, I since added a detailed proposal for a self-service version of this (the core value is rules-based on regex on the OCR, but the rules will work with tags, and combinations of both).
  • Also, this tag mechanism (even without implementing the full Collaborative Regex Engine) can be implemented here or on Robotoff. It’s also related to an idea we had on Robotoff a bit earlier: “Secondary insights”. The value-added of doing it on Robotoff is that we have the insight mechanism as a protection system, and that should allow us to move faster and bolder without breaking things.
  • Finally, we have already support in the taxonomy for this, with (for instance) many categories like PGI already mandating an origin 🎉
    • hr:Paška sol
      protected_name_type:en: pdo
      origins:en: en:Croatia

Copy link
Contributor

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

@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 Feb 27, 2024
@teolemon teolemon moved this to To discuss and validate in 🍊 Open Food Facts Server issues Apr 23, 2024
@teolemon
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automatic-data-augmentation Can be done by Robotoff categories 🎯 P1 ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. ⭐ top issue Top issue. Tags.pm 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies
Development

No branches or pull requests

3 participants