Skip to content



Repository files navigation

Knowledge Graphs book: examples

This repository contains examples in concrete syntaxes for the Knowledge Graphs book by Hogan et al, which is freely available online, with copies and ebooks available for purchase from Morgan & Claypool.


The book provides examples in an abstract graphical notation in order to be friendly to newcomers, and to avoid them getting "bogged down" in details relating to syntax. Nevertheless, for newcomers that are interested to learn how these theoretical concepts are implemented in practice, in this repository we provide concrete implementations of the examples and figures of our paper in various languages and syntaxes.

The examples are divided into folders for each subsection according to the book. To find a particular example you can also search by the name of a particular figure in the repository (e.g., "figure_3_9_a", "table_4_1", etc.). We may include multiple syntaxes/languages for some examples, indicated with different file extensions.

Since many different file formats and standards are used in this repository, we include pointing to the documentation of the respective standards, indicate where you can try out the examples online, or otherwise where you can find code relating to the example.


The following is a list of resources tht the respective examples link to:


Please feel free to submit bug reports and pull requests!

For example, if you are a lecturer and structure your slides after the paper, you might create additional examples or step-by-step calculations to explain the paper's concepts to your students. Feel free to add those to this repository!



To the extent possible under law, the contributors waive all copyright and related or neighboring rights to the contents of this repository.


If you wish to cite this source, you can use:

  author = {Hogan, Aidan and Blomqvist, Eva and Cochez, Michael and
d'Amato, Claudia and de Melo, Gerard and Guti\'errez, Claudio and
Kirrane, Sabrina and Labra Gayo, Jos\'e Emilio and Navigli, Roberto and
Neumaier, Sebastian and Ngonga Ngomo, Axel-Cyrille and Polleres, Axel and
Rashid, Sabbir M. and Rula, Anisa and Schmelzeisen, Lukas and
Sequeda, Juan F. and Staab, Steffen and Zimmermann, Antoine},
  doi = {10.2200/S01125ED1V01Y202109DSK022},
  isbn = {9781636392363},
  language = {English},
  number = {22},
  numpages = {237},
  publisher = {Morgan \& Claypool},
  series = {Synthesis Lectures on Data, Semantics, and Knowledge},
  title = {{K}nowledge {G}raphs},
  url = {},
  year = {2021}


Examples from knowledge graphs tutorial paper







No releases published


No packages published