Line 102: |
Line 102: |
| ** Only a few adhoc tests run during builds | | ** Only a few adhoc tests run during builds |
| ** Test sets needs to be created | | ** Test sets needs to be created |
| + | More details can be found on the page [[Ingredients List Cutting]]. |
| | | |
| ==== Validation and/or correction by users ==== | | ==== Validation and/or correction by users ==== |
Line 186: |
Line 187: |
| ** 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
| |
| | | |
| + | ==== 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 212: |
| *** in that case we delete the min and max values | | *** in that case we delete the min and max values |
| | | |
− | Result:
| + | ==== 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] |
| * | | * |
Line 372: |
Line 373: |
| ** API | | ** API |
| *** product URL on OFF: https://fr.openfoodfacts.org/produit/3560070223145/pistaches-grillees-carrefour | | *** product URL on OFF: https://fr.openfoodfacts.org/produit/3560070223145/pistaches-grillees-carrefour |
− | *** add "/api/v0" to get JSON result: https://fr.openfoodfacts.org/api/v0/produit/3560070223145/pistaches-grillees-carrefour | + | *** add "/api/v2" to get JSON result: https://fr.openfoodfacts.org/api/v2/produit/3560070223145/pistaches-grillees-carrefour |
| * Sorted lists with counts of individual ingredients for a subset of product | | * Sorted lists with counts of individual ingredients for a subset of product |
| ** https://fr.openfoodfacts.org/ingredients?stats=1 | | ** https://fr.openfoodfacts.org/ingredients?stats=1 |
Line 393: |
Line 394: |
| This page describes [[How to improve ingredients analysis]] (after the text of the ingredients list has been extracted). | | This page describes [[How to improve ingredients analysis]] (after the text of the ingredients list has been extracted). |
| | | |
− | [[Category:Project:Personalized_Search]] | + | [[Category:Ingredients]] |