-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Limit percent max of some ingredients (e.g. aroma, ferments) (needed for milk estimate for Nutri-Score) #5369
Closed
Labels
✨ Feature
Features or enhancements to Open Food Facts server
🥗🔍 Ingredients analysis
https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis
🚦 Nutri-Score
Comments
This issue is stale because it has been open 90 days with no activity. |
I'm working on this at the moment. Proposing to add a percent_max:en property to the ingredients taxonomy. |
1 task
In order to limit the "blast radius" of this change the percent_max will not be applied in the following scenarios:
|
stephanegigandet
added a commit
that referenced
this issue
Nov 9, 2022
…7639) * Allow a percent_max to be specified in ingredients * Update lib/ProductOpener/Ingredients.pm Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org> * Additional guard against maximum. Note test doesn't fail without this * Make else block consistent * Set MSYS_NO_PATHCONV for Windows and added update_tests_results make task * Limiting scope so can't contradict stated percentages * Catch empty ingredients and removed debugging * Fix perltidty * Fix for perlcritic * Cope with multiple constrained ingredients Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Repository owner
moved this from To do
to Done
in Ingredient analysis
Nov 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
✨ Feature
Features or enhancements to Open Food Facts server
🥗🔍 Ingredients analysis
https://wiki.openfoodfacts.org/Ingredients_Extraction_and_Analysis
🚦 Nutri-Score
What
We currently estimate % min and max for each ingredient in the ingredient list. And those % can be used for the Nutri-Score (e.g. to see if a product has more than 80% milk and should not be considered a beverage), for the Eco-Score etc.
For something like "Milk, ferments", we get this result:
https://world.openfoodfacts.org/cgi/test_ingredients_analysis.pl?ingredients_text=Milk%2C+ferments&type=add&action=process&submit=Envoyer
Milk -> en:milk - vegan: no - vegetarian: yes - percent_min: 50 - percent_max: 100
ferments -> en:ferment - vegan: maybe - vegetarian: maybe - percent_min: 0 - percent_max: 50
In practice, we could consider that some ingredients are never above 5% (unless they are the first and sole ingredients, like a bottle of ferments or a bottle of aroma).
And in this case, we could determine that this product is at least 95% milk, instead of at least 50% milk.
Part of
The text was updated successfully, but these errors were encountered: