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

Assume products don't contain palm oil if we didn't detect palm oil in ingredients, even if some ingredients are unidentified #6700

Closed
stephanegigandet opened this issue Apr 26, 2022 · 2 comments · Fixed by #6713
Labels
✨ Feature Features or enhancements to Open Food Facts server palm oil

Comments

@stephanegigandet
Copy link
Contributor

Is your feature request related to a problem? Please describe.

For most products, we mark the ingredients analysis for palm oil, vegan and vegetarian as "unknown" because even though we didn't detect palm oil, meat etc. there is at least one ingredient that we didn't recognize, so there is a possibility that it contains palm oil or meat etc.

e.g. for US products: https://us.openfoodfacts.org/ingredients-analysis


Ingredients analysis Products *
Vegetarian status unknown 212254
Palm oil content unknown 176979
Non-vegan 146183
Vegan status unknown 125784
Palm oil free 84100
Vegetarian 51024
Non-vegetarian 45105
Vegan 44871
Palm oil 37854
May contain palm oil 30830
Maybe vegetarian 21732
Maybe vegan 13271

For palm oil specifically, I think we could relax that, and make the assumption that if there is palm oil listed, then we will recognize it.

It's probably ok in almost all cases (except OCR / spelling mistakes) as there are relatively few wordings for palm oil

We can't do it for vegetarian / vegan as there are countless unidentified ingredients that do contain meat.

Describe the solution you'd like

Mark products as "palm oil free" if:

  • we have a list of ingredients
  • we have not detected palm oil in any of the recognized ingredients
  • even if there are unrecognized ingredients

A variant could be to have a threshold on unrecognized ingredients (e.g. max 20% of unrecognized ingredients). That would remove products that have bogus lists of ingredients, or lots of OCR mistakes, that would increase a lot the chance of missing a mispelled "pa1m oil"

Describe alternatives you've considered

Make ingredients analysis perfect. :)

Additional context

Discussion in Slack: https://openfoodfacts.slack.com/archives/C06A7LENM/p1650986280363959

Number of products impacted

No response

Time per product

No response

@stephanegigandet stephanegigandet added ✨ Feature Features or enhancements to Open Food Facts server palm oil labels Apr 26, 2022
@alexgarel
Copy link
Member

@stephanegigandet

Mark products as "palm oil free" if:

Could it be that we can add a rule "we have no generic fat ingredient" (eg ingredient list contains "huiles végétales").

@stephanegigandet
Copy link
Contributor Author

stephanegigandet commented Apr 27, 2022

Could it be that we can add a rule "we have no generic fat ingredient" (eg ingredient list contains "huiles végétales").

@alexgarel : If we have a generic fat ingredient, we will mark it as "may contain palm oil" (which is different thant "palm oil content unknown").

e.g. https://fr.openfoodfacts.org/cgi/test_ingredients_analysis.pl?ingredients_text=huile+v%C3%A9g%C3%A9tale&type=add&action=process&submit=Envoyer

stephanegigandet added a commit that referenced this issue May 10, 2022
* fix: assume unrecognized ingredients are not palm oil #6700

* update tests

* keep and display unknown ingredients even for palm oil free products

* update tests

* small fixes and test updates
Repository owner moved this from Todo to Done in 🍊 Open Food Facts Server issues May 10, 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 palm oil
Projects
Development

Successfully merging a pull request may close this issue.

2 participants