Ingredients

From Open Food Facts wiki

Ingredients represent one of the most important data to be collected, as it is used for many usages.

Usages

  • Nova calculation
  • Nutri-Score calculation: it is used to calculate the proportion of fruit and nuts
  • evaluation of some food preferences such as vegetarians, vegans, etc.
  • automatic identification of allergens (both substances and traces, see below)
  • etc.

Help and discussion

Discussions related to ingredients take place in the #ingredients channel on our Slack space.

Filling ingredients data

This is done through an application. Steps as are follow:

  • text acquisition
    • either a user type ingredients
    • or
      • he upload an image, or select an existing one
      • we send it to an OCR (image to text)
      • we fill the text but ask user to verify and eventually correct it
  • text parsing
    • when submitted, text description is parsed by the product opener code
    • this code heavily relies on the ingredients taxonomy to identify as much ingredients as possible
    • but also on specific local habits in the way to write ingredients (and you may contribute code for your country, or report specific problems)
    • it also tries to distinguish between ingredients, origins, processing, quantities, and sub-ingredients (ingredients composing other ingredients)

Database

In the database, this field is called ingredients_text_[language code] which contains the raw data by language.

ingredients contains all inferred information thanks to parsing, ingredients_tags contains ingredients taxonomy entries (and their parents) corresponding to identified ingredients.

Other fields are derived from this analysis like allergens_from_ingredients or ingredients_analysis

Tools

Taxonomy

To allow analysis and translation, Open Food Facts community has build an ingredients taxonomy. You can contribute to it.

Ingredients analyzing

Analyzing ingredients is not an easy task. A whole page is dedicated to Ingredients Extraction and Analysis.

On every products, you can also see how the software identifies ingredients in the text to verify its understanding.

As a result we can find metrics related to Ingredients Analysis Quality.

Ingredients issues

See issues related to ingredients.