jojolebarjos / food-ontology

Cuisine-oriented food ontology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Food ontology

This ontology is designed to handle culinary needs. Biological, chemical and nutritional components are also considered to improve usability and reliability.

Overview

Items are mostly everything, from raw ingredients to compound dishes. This is not limited to edible concepts (e.g. brands and processing indications). Together, a directed acyclic graph is built, as commonly done in ontologies. For simplicity sake's, a custom format with weak annotation is used, which is closer to thesauri formalism than RDF-based ontologies.

In particular, the following relationships exist between items:

  • product-of links attach a food to its producer, usually used to highlight the origin of milk, eggs and honey. Not to be confused with the remaining relationships, used to represents direct extraction or transformation (i.e. a steak is a beef derivate, not a beef product).
  • derivative-of is the most generic relationship, which simply indicate the presence of an item, regardless of its transformation or extraction scheme. In particular, future versions are likely to introduce new specializations of this concept.
  • part-of is a kind of derivate relationship, which indicates the usage of only some parts (e.g. seeds are part of fruits).
  • made-of is the opposite derivate relationship, used for compositions with minimal transformations (e.g. egg dishes are made of eggs). In practice, non-straightforward transformations use derivate-of links (e.g. wine is derivated from grape).
  • kind-of dependencies are traditional is-a relations, providing inheritance (more on transitivity below), which is the strongest derivation process. Multiple inheritance is allowed (e.g. tomatoes are both vegetables and fruits).

Implicit information is provided using inheritance and transitivity:

  • kind-of relationships transfer all dependencies (e.g. chicken soup has chicken parts).
  • The other derivate-of links transfer everything, except inheritance (e.g. lemon juice is not a fruit, but it is a fruit juice).
  • product-of dependencies do not transfer anything (e.g. honey is not an insect).

Additional attributes can be specified, including names and references to other corpora. Currently, the following references are in-use (non-exhaustive, except is specified):

Other relationships and attributes can be used to refine taxonomies:

  • substitute-of reports semantical equivalences (e.g. aspartame is a sugar substitute), which does not include practical substitutes (e.g. almond powder is not officially a substitute of flour).
  • modifier markers are used to specify important aspects of the item (e.g. dried, cooked, canned...)

Scraper

...

python -c "import food.scraper.main"

Annotator

...

pip install CyHunspell regex
pip install git+https://github.com/globality-corp/sklearn-hierarchical-classification.git
python -c "import food.parser.main"

License

The content of the ontology itself is licensed under the Creative Commons Attribution Share Alike 4.0 license, and the underlying source code used to process and format that content is licensed under The Unlicense.

Note that this does not apply to referenced corpora, which are often in public domain. Please consult the official websites for more information.

Additional corpora that are included for convenience have dedicated licenses, e.g. English Universal Dependencies corpus is under Creative Commons Attribution Share Alike 4.0 license.

About

Cuisine-oriented food ontology

License:The Unlicense


Languages

Language:JavaScript 62.7%Language:Python 20.7%Language:HTML 12.2%Language:CSS 4.5%