Line 1: |
Line 1: |
| + | == Quantities == |
| + | Collecting quantity isn't so simple: |
| + | * we can see various units |
| + | * we can see various ways of dealing with net weight and drained weight |
| + | * sometimes portions are well specified and sometimes not |
| + | * we can see many ways of ordering printed data on the packages |
| + | * ... |
| + | |
| + | === Units === |
| + | ... |
| + | |
| + | === e sign === |
| + | The ℮ sign (for "[https://en.wikipedia.org/wiki/Estimated_sign estimated sign]") is used in Europe and other countries, at least Australia: https://www.industry.gov.au/sites/default/files/2019-04/guide-to-the-average-quantity-system.pdf (p. 12) |
| + | |
| + | It seems to refer to the Average Quantity System (AQS) which is in use in Australia, Canada, European Union, India, Japan, New Zealand, South Africa and Switzerland -- source: https://www.sfa.gov.sg/docs/default-source/tools-and-resources/resources-for-businesses/avabriefingonaqsslides1 (slide 3). |
| + | |
| + | |
| + | == How to enter the data == |
| + | For the moment, the best is to enter the data as it is printed on the product. |
| + | |
| + | |
| == How to handle it == | | == How to handle it == |
| + | |
| === Logic to handle it === | | === Logic to handle it === |
| + | ... |
| + | |
| === Existing libraries to parse weights and quantities === | | === Existing libraries to parse weights and quantities === |
| * https://github.com/iancanderson/ingreedy | | * https://github.com/iancanderson/ingreedy |
Line 21: |
Line 45: |
| **Useful to fix calorie calculation for some products | | **Useful to fix calorie calculation for some products |
| * Calculate packaging weight by making the difference between actual weight and advertised weight | | * Calculate packaging weight by making the difference between actual weight and advertised weight |
− | * Calculate weight per volume for products (1dL of water is 1kg, but this changes for various products that also have a mention of their volume) | + | * Calculate weight per volume for products (1dL of water is 1kg, but this changes for various products that also have a mention of their volume, e.g. milk) |
| * Some products will have multilingual weights | | * Some products will have multilingual weights |
| ** we can check that the conversion is well done if we have both values | | ** we can check that the conversion is well done if we have both values |
Line 32: |
Line 56: |
| Some remarks: | | Some remarks: |
| * product central - any quantity that is indicated is about the product and not the packaging; | | * product central - any quantity that is indicated is about the product and not the packaging; |
| + | * product unit - reference may be made to a product unit, eg a cookie, a chocolate egg, etc. |
| * equivalents - one or more equivalents might be available, i.e. in grams, oz or liters, 24 cookies / 6 cookies in 4 packages; | | * equivalents - one or more equivalents might be available, i.e. in grams, oz or liters, 24 cookies / 6 cookies in 4 packages; |
| * containers - the generic toplevel package is a container; | | * containers - the generic toplevel package is a container; |
Line 44: |
Line 69: |
| * marketing - some quantities are added for marketing purposes, extra 25g; | | * marketing - some quantities are added for marketing purposes, extra 25g; |
| * subsubcontainers - an extra subdivision, eg 1 carton of yoghurt with 2 layers and 8 pots per layer; | | * subsubcontainers - an extra subdivision, eg 1 carton of yoghurt with 2 layers and 8 pots per layer; |
| + | * servings - a quantity might contain a number of servings |
| | | |
| === Generic formula === | | === Generic formula === |
Line 51: |
Line 77: |
| | | |
| <big>container_multiplier x container_name x product_multiplier x (sub_)product_name x quantity_value x quantity_unit</big> | | <big>container_multiplier x container_name x product_multiplier x (sub_)product_name x quantity_value x quantity_unit</big> |
| + | |
| + | This formula should be valid for each container/subcontainer/subsubcontainer level, but should reflect the entire package. So one has to add multipliers and brackets where appropriate. |
| | | |
| For example: | | For example: |
Line 62: |
Line 90: |
| | | |
| * to indicate times, either a "*" or a "x" is used; | | * to indicate times, either a "*" or a "x" is used; |
− | * equivalent formulas are distinguished by a ";" or brackates "(,)" | + | * equivalent formulas are distinguished by a ";" or brackets "(,)" |
| ** multiplier indicates how often a quantity unit is used, i.e. 6 (25 cl bottles). This is a number. | | ** multiplier indicates how often a quantity unit is used, i.e. 6 (25 cl bottles). This is a number. |
| ** quantity the size of the units in size_units, i.e. 25 (size) cl (size_unit) bottles (units). This is a number. | | ** quantity the size of the units in size_units, i.e. 25 (size) cl (size_unit) bottles (units). This is a number. |
Line 91: |
Line 119: |
| |- | | |- |
| | 200 g [160 g (2 x 8 pièces) mini-nems + 40 g sauce nuoc mâm] || - || - || - || - || 200 || g | | | 200 g [160 g (2 x 8 pièces) mini-nems + 40 g sauce nuoc mâm] || - || - || - || - || 200 || g |
| + | |- |
| + | | or || - || - || 2x8 || mini-nems || 160 || g |
| + | |- |
| + | | + || - || - || - || sauce nuoc mâm || 40 || g |
| |- | | |- |
| | 211,5 g (9x23,5g) || - || - || - || - || 211,5 || g | | | 211,5 g (9x23,5g) || - || - || - || - || 211,5 || g |
Line 96: |
Line 128: |
| | or || 9 || - || - || - || 23,5 || g | | | or || 9 || - || - || - || 23,5 || g |
| |- | | |- |
− | | 220g (2 unités, 2 x (60 g + 50 g)) || | + | | 220g (2 unités, 2 x (60 g + 50 g)) || - || - || - || - || 220 || g |
| + | |- |
| + | | or || - || - || 2 || unités || 60 + 50 || g |
| + | |- |
| + | | 2 x 21.5 g = 43 g || - || - || - || - || 43 || g |
| + | |- |
| + | | or || 2 || - || - || - || 21.5 || g |
| + | |- |
| + | | 300 g (15 biscuits de 20 g) || - || - || - || - || 300 || g |
| + | |- |
| + | | or || - || - || 15 || biscuits || 20 || g |
| |- | | |- |
− | | 2 x 21.5 g = 43 g || | + | | 1 Litre || - || - || - || - || 1 || litre |
| |- | | |- |
− | | 300 g (15 biscuits de 20 g) || | + | | 18tranche || - || - || 18 || tranches || - || - |
| |- | | |- |
− | | 1 Litre || - || 1 || litre || - | + | | 375 g, 30 pièces || - || - || - || - || 375 || g |
| |- | | |- |
− | | 18tranche || 18 || - || - || tranches | + | | or || - || - || 30 || pièces || - || - |
| |- | | |- |
− | | 375 g, 30 pièces || - || 375 || g || - | + | | 240 g (12 Portions) || - || - || - || - || 240 || g |
| |- | | |- |
− | | or || 30 || - || - || pièces | + | | or || - || - || 12 || portions|| - || - |
| |- | | |- |
− | | 240 g (12 Portions) || - || 240 || g || - | + | | 400 g (12 à 18 bouchées )|| - || - || - || - || 400 || g |
| |- | | |- |
− | | or || 12 || - || - || portions | + | | or || - || - || 12 à 18 || bouchées || - || - |
| |- | | |- |
− | | 400 g (12 à 18 bouchées) || | + | | Poids net 190 g, poids net égoutté 140 g || - || - || - || net || 190 || g |
| |- | | |- |
− | | Poids net 190 g, poids net égoutté 140 g || | + | | Poids net 190 g, poids net égoutté 140 g || - || - || - || net égoutté || 140 || g |
| |- | | |- |
− | | contenance : 4250ml, poids net total : 4000g, poids net égoutté : 2210g || | + | | contenance : 4250ml, poids net total : 4000g, poids net égoutté : 2210g ||- || - || - || - || 4250 || ml |
| |- | | |- |
− | | 3 x [200 g (130 g net égoutté), 212 ml] || | + | | or ||- || - || - || net || 4000 || g |
| |- | | |- |
− | | 330 g (dont 180 g net), 370 mL || | + | | or ||- || - || - || net égoutté || 2210 || g |
| |- | | |- |
− | | 28 g - 20 dragées || - || 28 || g || - | + | | 3 x [200 g (130 g net égoutté), 212 ml] || 3 || - || - || - || 200 || g |
| |- | | |- |
− | | or || 20 || - || - || dragées | + | | or || 3 || - || - || - || 212 || ml |
| |- | | |- |
− | | 260 g (26 portions de 10 g) | + | | or || 3 || - || - || net egoutté || 130 || g |
| |- | | |- |
− | | 130 g pour 20 galettes || - || 130 || g || - | + | | 330 g (dont 180 g net), 370 mL ||- || - || - || - || 330 || g |
| |- | | |- |
− | | or || 20 || - || - || galettes | + | | or ||- || - || - || - || 370 || mL |
| |- | | |- |
− | | 280 ml - 310 g || - || 280 || ml || - | + | | or ||- || - || - || net || 180 || g |
| |- | | |- |
− | | || - || 310 || g || - | + | | 28 g - 20 dragées || - || - || 20 || dragées || 28 || g |
| |- | | |- |
− | | 25 sachets || 25 || - || - || sachets | + | | 260 g (26 portions de 10 g) || - || - || - || - || 260 || g |
| |- | | |- |
− | | 220 g (1 personne) || - || 220 || g || - | + | | 130 g pour 20 galettes || - || - || 20 || galettes || 130 || g |
| |- | | |- |
− | | 128 g (16 bâtonnets de 2 cubes) || - || 128 || g || - | + | | 280 ml - 310 g || - || - || - ||- || 280 || ml |
| |- | | |- |
− | | || 16 || - || - || bâtonnets | + | | or || - - || - || - ||- || 310 || g |
| |- | | |- |
− | | || 16x4 || - || - || cubes | + | | 25 sachets || 25 || sachets || - || - || - || - |
| |- | | |- |
− | | 12 (calibre Moyen => 53 à 63 g) || 12 || - || - || calibre moyen | + | | 220 g (1 personne) || - || - || - || - || 220 || g |
| |- | | |- |
− | | 8 sachets de 4 || 8 || - || - || sachets | + | | 128 g (16 bâtonnets de 2 cubes) || - || - || 16 || bâtonnets || 128 || g |
| |- | | |- |
− | | || 8x4 || - || - || - | + | | or || - || - || 16x2 || cubes || 128 || g |
| |- | | |- |
− | | 400 g, 425 ml (3 douzaines) | + | | 12 (calibre Moyen => 53 à 63 g) || - || - || 12 || calibre moyen || 53 à 63 || g |
| + | |- |
| + | | 8 sachets de 4 || 8 || sachets || 4 || - || - || - |
| + | |- |
| + | | 400 g, 425 ml (3 douzaines) || - || - || 3x12 || - || 400 || g |
| + | |- |
| + | | 400 g, 425 ml (3 douzaines) || - || - || 3x12 || - || 425 || ml |
| |- | | |- |
| | 228g (4x57g) / 48 cl (4x12cl) | | | 228g (4x57g) / 48 cl (4x12cl) |
Line 228: |
Line 276: |
| | nestle || 228g (4x57g) / 48 cl (4x12cl) || [http://fr.openfoodfacts.org/produit/2000000003897 (link)] | | | nestle || 228g (4x57g) / 48 cl (4x12cl) || [http://fr.openfoodfacts.org/produit/2000000003897 (link)] |
| |} | | |} |
− | | + | [[Category:OCR]] |
| [[Category:ProductOpener]] | | [[Category:ProductOpener]] |