Data fields: Difference between revisions

From Open Food Facts wiki
(+ product name and common name)
(common_name)
Line 26: Line 26:
* <code>Petit déjeuner Nesquick</code> => you don't have to explain, just put the name from the packaging
* <code>Petit déjeuner Nesquick</code> => you don't have to explain, just put the name from the packaging
* <code>Nutella by Ferrero</code> => you shouldn't fill the brand here, there's a field for that :)
* <code>Nutella by Ferrero</code> => you shouldn't fill the brand here, there's a field for that :)


==== Common name ====
==== Common name ====
The common name define the product. It is the name used when you don't want or can't use the product name. This name is very useful for our AI (artificial intelligence): it helps to guess the category of the product.
The common name defines the product. It is the name used when you don't want or can't use the product name. This is the place where you say "Cocoa and hazelnuts spreads" instead of "Nutella". This name is very useful for our AI (artificial intelligence): it helps to guess the category of the product.
 
The common name might be equivalent to product category but sometimes not [examples].





Revision as of 18:06, 13 March 2020

Data fields

A "data field" is a structured information that has at least a specific usage. For example, the "product name" field allows us to easily recognize the main name printed on the packaging.

Open Food Facts manages different kinds of data fields:

  1. fields that can be completed by users, such as the name of the product, the brand, etc.
  2. fields that are always computed by machines such as the name of the contributor or the date of the contribution
  3. fields that are sometimes computed based on other fields, such as the Nutri-Score, the Nova score, etc.

Fields completed by users

[to be completed]

Product name

The product name is the main name printed on the packaging. It can be a registered trademark such as Nutella. This data is important and useful as it's one of the most used data.

At the beginning of 2020, more than 95% of Open Food Facts products have a product name:

The product name shouldn't include any other information such as the brand of the product, the weight, etc.

Good examples:

Bad examples:

  • Petit déjeuner Nesquick => you don't have to explain, just put the name from the packaging
  • Nutella by Ferrero => you shouldn't fill the brand here, there's a field for that :)


Common name

The common name defines the product. It is the name used when you don't want or can't use the product name. This is the place where you say "Cocoa and hazelnuts spreads" instead of "Nutella". This name is very useful for our AI (artificial intelligence): it helps to guess the category of the product.

The common name might be equivalent to product category but sometimes not [examples].


Best before date (expiration date)

The expiration date is a way to track product changes over time and to identify the most recent version. It's a data for manual usages. At this moment (2020-03), Open Food Facts apps and website don't make any usage of this field. An issue is open to throw off very old products in averages, it could be useful for it.

Be aware that, for the moment, this field is NOT normalized, so it probably contains dates in various formats that can be ambiguous (31/12/2019, 12/31/2019, 13 mai 2018, etc.).

It is possible to see:

In the database and in Product Opener software, the technical name for this field is expiration_date.


Serving size

Serving size has a specific goal: to let Open Food Facts app make a proportional calculation of each nutrient per serving size. If a candy's weight is 5 g, it can be chosen as the serving size: if these candies has 66 g of sugar per 100 g, it has about 3 g per candy. Allowed units are: kg, g, mg, µg, oz, l, dl, cl, ml, fl.oz, fl oz, г, мг, кг, л, дл, кл, мл, 毫克, 公斤, 毫升, 公升, 吨.

grammes, liter, etc., are NOT recognized.

Decimals can be written with a comma (,) or a point (.).

Good:

  • 60 g (preferred, for readability reasons)
  • 30g
  • 35G
  • 90 ml
  • 1L

Possible (while not recommanded):

  • cookie 25g
  • One Slice (50g)
  • 97 g (0.5 cup)

Bad:

  • 30 gr => gr is not a correct unit
  • 9 candies and 2 biscuits => it's not possible to calculate a ratio because we don't know the weight of this portion
  • 30 => there is no unit

In the database and in Product Opener software, the technical name for this field is serving_size.