1,082
edits
(ingredients percent estimation) |
|||
Line 186: | Line 186: | ||
** Perl code and regular expressions + multilingual ingredients taxonomy | ** Perl code and regular expressions + multilingual ingredients taxonomy | ||
*** lib/ProductOpener/Ingredients.pm - extract_ingredients_from_text() | *** lib/ProductOpener/Ingredients.pm - extract_ingredients_from_text() | ||
==== Ingredient percent analysis ==== | |||
* Goal: for each ingredient and sub-ingredient, we compute the minimum and maximum absolute percent | * Goal: for each ingredient and sub-ingredient, we compute the minimum and maximum absolute percent | ||
* Constraints: | * Constraints: | ||
Line 211: | Line 211: | ||
*** in that case we delete the min and max values | *** in that case we delete the min and max values | ||
==== Ingredients analysis result: ==== | |||
* Add /api/v2 to get JSON results through API: [https://fr.openfoodfacts.org/api/v0/produit/5000112558265/coca-cola-zero https://fr.openfoodfacts.org/api/v2/produit/5000112558265/coca-cola-zero] | * Add /api/v2 to get JSON results through API: [https://fr.openfoodfacts.org/api/v0/produit/5000112558265/coca-cola-zero https://fr.openfoodfacts.org/api/v2/produit/5000112558265/coca-cola-zero] | ||
* | * |