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

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

Open stephanegigandet opened 4 years ago

stephanegigandet commented 4 years ago

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

bernardlemoullec commented 4 years ago

Good idea! Thank you Stéphane

teolemon commented 3 years ago
+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 commented 3 years ago
github-actions[bot] commented 9 months ago

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

teolemon commented 2 months ago