ProductOpener::DataQualityFood - check the quality of data for food products
ProductOpener::DataQualityFood
is a submodule of ProductOpener::DataQuality
.
It implements quality checks that are specific to food products.
When the type of products is set to food,
ProductOpener::DataQuality::check_quality()
calls ProductOpener::DataQualityFood::check_quality()
,
which in turn calls all the functions of the submodule.
The module has 4 hardcoded lists of brands: @baby_food_brands, @cigarette_brands, @petfood_brands and @beauty_brands
We will probably create a brands taxonomy at some point, which will allow us to remove those hardcoded lists.
Detects some categories like baby milk, baby food and cigarettes from other fields such as brands, product name, generic name and ingredients.
Compares the nutrition score and nutrition grade (Nutri-Score) we have computed with the score and grade provided by manufacturers.
Checks related to the carbon footprint computed from ingredients analysis.
Checks related to the nutrition facts values.
In particular, checks for obviously invalid values (e.g. more than 105 g of any nutrient for 100 g / 100 ml). 105 g is used instead of 100 g, because for some liquids, 100 ml can weight more than 100 g.
Checks related to the nutrition facts values.
In particular, checks for obviously invalid values (e.g. more than 105 g of any nutrient for 100 g / 100 ml). 105 g is used instead of 100 g, because for some liquids, 100 ml can weight more than 100 g.
Check that the product nutrition facts are comparable to other products from the same category.
Compare with the most specific category that has enough products to compute stats.
Checks related to the ingredients list and ingredients analysis.
Checks related to the quantity and serving quantity.
Checks related to specific product categories.
Alcoholic beverages: check that there is an alcohol value in the nutrients.
Checks related to specific product labels.
Checks if we were able to analyze the minimum and maximum percent values for ingredients and sub-ingredients.
Check if all or almost all the ingredients have a specified percentage in the ingredients list.
Checks for data needed to compute the Eco-score.
Add info tags about food groups.
Checks if 2 incompatible tags are assigned to the product
To include more tags to this check, add the property "incompatible:en" at the end of code block in the taxonomy
Example: en:Non-fair trade, Not fair trade fr:Non issu du commerce équitable incompatible_with:en: en:fair-trade
Run all quality checks defined in the module.