Ingredients ontology: Difference between revisions

From Open Food Facts wiki
Line 35: Line 35:


=== Example ===
=== Example ===
<br /><nowiki>#</nowiki> '''CLARIFIED BUTTER - en:milk fat rendered from butter to separate the en:milk solids and water from the en:butterfat'''
<nowiki>#</nowiki> '''CLARIFIED BUTTER - en:milk fat rendered from butter to separate the en:milk solids and water from the en:butterfat'''
<br />
<br />
<br />''<en:butter''
<br />''<en:butter''
Line 44: Line 44:
<br />''de:Butterschmalz''
<br />''de:Butterschmalz''
<br />
<br />
=== Explanation ===
=== Explanation ===
* The <nowiki>#</nowiki>  describes a comment line and can be used to add a definition of the ingredient. In this case the definition is taken from wikipedia.
* The <nowiki>#</nowiki>  describes a comment line and can be used to add a definition of the ingredient. In this case the definition is taken from wikipedia.

Revision as of 17:34, 10 August 2018

Introduction

Why?

Why do we need an ingredients ontology? The ontology describes how ingredients are derived from each other and how ingredients can be combined into new ingredients. An ontology might be useful to:

  • normalise ingredients - Producers take a lot of freedom in describing the ingredients they use. An ontology helps to standardise the ingredients.
  • find hidden ingredients - an ingredient might contain hidden ingredients, the ontology might reveal these. For example butter contains butterfat.
  • show combined ingredients - an ingredient might appear as a single ingredient. In reality however
  • reveal processed ingredients - often an ingredient is derived from an other ingredient through some process. We can make explicit what these processes are. Example clarified butter is created from butter by separating the milk solids and water from the butterfat.
  • show ingredient incompleteness - often an ingredient is incomplete defined in an ingredient list. For instance if an ingredient-list specifies milk, it should be defined from which mammal the milk comes from, for instance cow's milk.

Theory

What theory can be used to base an food ingredients taxonomy on? Is there already a food ontology somewhere?

Nodes

Each node in the ontology is an ingredient, as is found in ingredient lists of food products. Producers take a lot of freedom in describing the ingredients they use. This implies that an approach is needed to standardise the ingredients that are found in the ingredients list.

Synonyms

An ingredient might appear under different names, the synonyms. Of these multiple names one will be chose as main ingredient name.

Languages

Compound ingredients

Relationships

The following relationship types can be used to described how

  • contains - describes if an ingredient contains other ingredients. If possible the fraction/percentage/range can be added;
  • derived from - describes if an ingredient is derived from an other ingredient. In addition one could add a description of transformation process used;
  • isa - describes a detailed specification of an ingredient

Example

Maybe I can make a drawing of a part of the ontology.

Taxonomy

The ontology should be usable as the translations taxonomy. This taxonomy lists all ingredients, their synonyms and their translations. This taxonomy is already in use.

Example

# CLARIFIED BUTTER - en:milk fat rendered from butter to separate the en:milk solids and water from the en:butterfat

<en:butter
en:clarified butter
bxr:Шара тоһон
ca:mantega clarificada
cs:přepuštěné máslo
de:Butterschmalz

Explanation

  • The # describes a comment line and can be used to add a definition of the ingredient. In this case the definition is taken from wikipedia.
  • The <en:butter line describes the parent ingredient of this ingredient. The parent ingredient forms the basis of the current ingredient. This line is optional.
  • The en:clarified butter line is the main name of the ingredient. Any synonyms appear after the main name, separated by comma's. The prefix en: defines the language of the main ingredient.
  • The next lines provide translations of the main ingredient in other languages. One language per line. Each line starts with language prefix. Thus de: means german.