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
GNU Affero General Public License v3.0
632 stars 370 forks source link

Ingredient specific labels applied to whole product when there are more than one #9779

Open stephanegigandet opened 6 months ago

stephanegigandet commented 6 months ago

Reported on Slack by @FemmeNoire : https://openfoodfacts.slack.com/archives/C03H290LF/p1707586457600959

microbial enzymes (non-animal, rennetless)

The "non-animal" label is applied to the whole product, instead of just the ingredient.

Labels in parenthesis should only applied on the ingredient. It seems the parsing doesn't work that way when there are several labels for one ingredient.

anaritadauane commented 5 months ago

@stephanegigandet, is this a good first issue?

stephanegigandet commented 5 months ago

@anaritadauane That one is quite complex, the ingredient parsing code is very ugly, it may take quite some time to understand the code and the bug.

anaritadauane commented 5 months ago

@anaritadauane That one is quite complex, the ingredient parsing code is very ugly, it may take quite some time to understand the code and the bug.

I understand