Skip to content

Commit

Permalink
fix: Nutriscore for fresh herbs (#11112)
Browse files Browse the repository at this point in the history
Fresh herbs need to be included in fruits/vegetables/legumes

from FAQ-updatedAlgo-EN_20240626.pdf:

```
The detailed list of the various foods qualifying in this component is available in Appendix 2.
The foods included in the following groups from the Eurocode 2 classification10 (in English) can be taken into
account for the calculation of the component:
-
In both the Original and the Updated Algorithms:
i. Group 7.10 (Pulses) (i.e. Legumes);
ii.Group 8.10 (Leaf vegetables); 8.15 (Brassicas); 8.20 (Stalk vegetables); 8.25 (Shoot vegetables); 8.30
(Onion-family vegetables); 8.38 (Root vegetables); 8.40 (Fruit vegetables); 8.45 (Seed vegetables and
immature pulses); 8.50 (Edible fungi); 8.55 (Seaweeds and algae); 8.60 (Vegetable mixtures)
iii Group 9.10 (Malaceous fruit); 9.20 (Prunus species fruit); 9.25 (Other stone fruit); 9.30 (Berries); 9.40 (Citrus
fruit); 9.50 (Miscellaneous fruit); 9.60 (Fruit mixtures).
iv Group 12.20 (Herbs)
```
  • Loading branch information
stephanegigandet authored Jan 9, 2025
1 parent 4a7d484 commit cdd7cf5
Show file tree
Hide file tree
Showing 15 changed files with 1,577 additions and 208 deletions.
2 changes: 1 addition & 1 deletion lib/ProductOpener/Config_off.pm
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,11 @@ $options{categories_considered_as_beverages_for_nutriscore_2023} = [
$options{categories_exempted_from_nutriscore} = [
qw(
en:alcoholic-beverages
en:aromatic-herbs
en:baby-foods
en:baby-milks
en:chewing-gum
en:food-additives
en:dietary-supplements
en:meal-replacements
en:salts
en:spices
Expand Down
5 changes: 3 additions & 2 deletions lib/ProductOpener/Ingredients.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8130,6 +8130,7 @@ can be taken into account, whereas crisps which are thin and completely dehydrat
=cut

my %fruits_vegetables_legumes_eurocodes = (
"7.10" => 1,
"8.10" => 1,
"8.15" => 1,
"8.20" => 1,
Expand All @@ -8149,7 +8150,7 @@ my %fruits_vegetables_legumes_eurocodes = (
"9.40" => 1,
"9.50" => 1,
"9.60" => 1,
"7.10" => 1,
"12.20" => 1, # Herbs
);

sub is_fruits_vegetables_legumes ($ingredient_id, $processing = undef) {
Expand All @@ -8170,7 +8171,7 @@ sub is_fruits_vegetables_legumes ($ingredient_id, $processing = undef) {
((defined $eurocode_2_group_1) and ($eurocode_2_group_1 eq "9"))
# Vegetables and legumes
or ((defined $eurocode_2_group_2)
and (exists $fruits_vegetables_legumes_eurocodes{$eurocode_2_group_2}))
and ($fruits_vegetables_legumes_eurocodes{$eurocode_2_group_2}))
)
and (not $is_a_further_processed_ingredient)
and (not $further_processed)
Expand Down
4 changes: 2 additions & 2 deletions taxonomies/food/categories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116633,7 +116633,7 @@ nl: Eendterrine met morieljes
< en:Duck terrines
fr: Terrines de canard au muscat

en: Dietary supplements
en: Dietary supplements, food supplements
af: Diëet aanvulling
ar: مكمل غذائي
bs: Prehrambeni suplement
Expand All @@ -116647,7 +116647,7 @@ es: Suplementos dietéticos, Complementos alimenticios
eu: Elikadura-osagarri
fa: مکمل‌های غذایی طبیعی
fi: Ravintolisät, Lisäravintoaine
fr: Compléments alimentaires
fr: Compléments alimentaires, complément alimentaire
gl: Suplemento dietético
he: תוספי תזונה
hi: खाद्य पूरक
Expand Down
Loading

0 comments on commit cdd7cf5

Please sign in to comment.