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

Create an ingredients_origins structure from labels / origins like "French pork", "Cocoa from Ecuador" #4905

Open
Tracked by #9096 ...
stephanegigandet opened this issue Feb 26, 2021 · 0 comments
Labels
🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 📍 Origins Origins are used for Eco-Score computation. We want to have structured origins. ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.

Comments

@stephanegigandet
Copy link
Contributor

stephanegigandet commented Feb 26, 2021

What

  • We have a number of labels that indicate a specific ingredient comes from a specific origin. The origins (taxonomized) and origin (free text) fields can also contain similar indications.
  • It would be very useful to use those indications to populate a ingredients_origins map:
 {
 "en:milk" => "en:france",
 "en:cocoa" => "en:ecuador"
 }
  • That we could then use when we do ingredients analysis, to fill the origin of the matching ingredients. This in turn would be used for the Eco-Score computations.
  • For the labels, we can specify which ingredient and which origin is specified:
fr:Soja Français, Soja de France, Filière Soja Français
origins:en: en:france
ingredients:en: en:soy
  • And for the free text origins, we can try to recognize country names and adjectives + ingredients.

Part of

@stephanegigandet stephanegigandet added ✨ Feature Features or enhancements to Open Food Facts server 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products 📍 Origins Origins are used for Eco-Score computation. We want to have structured origins. labels Feb 26, 2021
@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 May 28, 2021
stephanegigandet added a commit that referenced this issue Feb 4, 2022
…re (#6377)

* new test for ingredient labels

* Extract ingredients origins from labels and use them in Eco-Score #4905

* Update lib/ProductOpener/Ingredients.pm

Co-authored-by: Alex Garel <[email protected]>

* Update lib/ProductOpener/Ingredients.pm

Co-authored-by: Alex Garel <[email protected]>

* suggestions from code review

* more ingredients/origins for labels

* update tests

Co-authored-by: Alex Garel <[email protected]>
@teolemon teolemon moved this to To discuss and validate in 🍊 Open Food Facts Server issues Apr 19, 2024
@teolemon teolemon removed the ✨ Feature Features or enhancements to Open Food Facts server label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products 🥗🔍 Ingredients analysis https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis 📍 Origins Origins are used for Eco-Score computation. We want to have structured origins. ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it.
Projects
Status: To do
Status: To discuss and validate
Development

No branches or pull requests

2 participants