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
660 stars 389 forks source link

Suggest category based on ingredients #10985

Open aleene opened 2 weeks ago

aleene commented 2 weeks ago

Problem

Many products do not have an associated category. This makes it impossible to calculated a Nutriscore.

Proposed solution

Use the ingredients to suggest an associated category.

Several categories have expected ingredients listed in the categories taxonomy. If a product without a category, but with ingredients, matches these ingredients, a suggestion can be made.

This can be applied to all products that have a single ingredient, such as fruits, vegetable, peanuts, milks, flours, oils, etc. It might be possible to extend this to products with multiple ingredients, such as cheeses.

Number of products impacted

50% of the products?

teolemon commented 2 weeks ago

Robotoff is actually already leveraging the ingredient list (among other signals) to predict the category. We're using:

as signals. We could advertise how the prediction is done discreetly in the UI. cc @raphael0202

aleene commented 2 weeks ago

That is great. So my cleaning up will help the predictions as well.

As we are now adding additional info on related categories and ingredients into the taxonomy, this could be added as well as signal??