Home

Awesome

What

This repository contains a template for writing OWL ontologies as Org Mode documents, with supporting functions and scripts.

Check out the files pizza.org, bfo-core.org, maintenance.org for example ELOT files.

ELOT works on Windows, MacOS, and Linux (tested in WSL).

Literate programming is a paradigm where the creator of some technical artefact focuses on the explanation and readability of each technical construct, rather than its formal machine-readable definition. The machine-readable artefacts are then extracted through a process called “tangling”.

ELOT takes inspiration from this paradigm and uses the excellent Emacs Orgmode plain-text format to create an author- and reader-friendly ontology authoring environment. Ontological constructs are generated from narrative sections and Manchester Notation (OMN) fragments. Diagrams are generated from Turtle examples or SPARQL queries by using the rdfpuml tool. The tool then extracts ontological definitions (OMN or Turtle) and documentation (HTML or PDF).

<a id="orgdc63e54"></a>

Prerequisites in brief

If you are new to Emacs, the book Mastering Emacs is highly recommended.

<a id="org0783d3c"></a>

Installation

<a id="org96e2956"></a>

Get Emacs

ELOT has only been tested on recent versions of Emacs. As of 2024-04, version 29.3 is the latest. See the GNU Emacs download page.

For Windows users: download Emacs from the emacs-29 for Windows directory. The package named emacs-29.3-installer.exe will work fine. It’s preferable to install into a folder that doesn’t contain spaces.

For Linux users: ELOT has been tested on WSL 2 (Windows Subsystem for Linux). It’s recommended to

For MacOS users: See the GNU Emacs page.

<a id="org46be23f"></a>

Install ELOT in Emacs

ELOT is in active development and will see frequent updates. For easy access to these updates, you should clone the ELOT repository using Git.

The following steps will get you started editing OWL ontologies.

  1. Create a directory for local Emacs add-ons in your home folder, named elisp (on Windows, that will likely mean c:\Users\myname\elisp\).

  2. Clone ELOT into the elisp folder using your Git client. If using a terminal for Git, the following will do it.

    cd elisp
    git clone https://github.com/johanwk/elot.git
    

    You should now have a subfolder of elisp called elot.

  3. Ensure ELOT is loaded when Emacs starts up.

    • For new Emacs users: find the file elot-init.el inside the elot folder, and copy it to a new file named .emacs in your home folder, then restart Emacs. You should now be looking at a basic, working Emacs configuration.
    • Experienced Emacs users should open elot-init.el and look at the list of packages that are required. Add ~/elisp/elot/elot-package/ to your load-path.

<a id="orgef569b1"></a>

Install ELOT auxiliaries

ELOT relies on external software programs to query your ontologies and produce diagrams. These need to be downloaded.

Preparatory steps, if needed:

  1. Create a directory named bin in your home folder: you will download programs to this folder. On Windows, that will mean c:\Users\myname\bin\.
  2. Ensure the bin folder is on your PATH, so the programs can be found by ELOT. On Windows, use the Control Panel to edit Local Environment Variables and add c:\Users\myname\bin\ to the list.

Get the tools:

  1. The ROBOT tool is highly recommended for ELOT. Download robot.jar from the ROBOT releases page to your bin folder.
  2. The PlantUML tool is needed for diagrams. Download the latest version from PlantUML Downloads (tested with plantuml-1.2024.3.jar) to your bin folder. For convenience, rename it as just plantuml.jar (on Linux, make a symlink).
  3. The rdfpuml tool will produce great-looking diagrams for ontologies.
    • On Windows, download rdfpuml.exe to your bin folder.

    • On Linux or MacOS, clone the repository to your bin folder, then add ~/bin/rdf2rml/bin/ to your PATH. Install Perl modules as listed in the rdfpuml installation guide.

      cd ~/bin
      git clone https://github.com/VladimirAlexiev/rdf2rml.git
      

<a id="org6438d73"></a>

Quick start using ELOT

<a id="org57c84a9"></a>

Adding an ontology

After the installation steps, it’s wise to restart Emacs!

Open the familiar Pizza ontology from elisp/elot/pizza.org for an example of what an ELOT file will look like.

To create a new ontology, do this in Emacs:

img

img

Now create an OWL file from your new document.

img

img

<a id="org46fd886"></a>

Adding classes and relations

img

<a id="org15b475e"></a>

Adding annotations

ELOT makes it easy to add annotations to both annotations and axioms: just put them in a sublist. In this screenshot, two annotations are added to the “transitive” characteristic axiom:

img

<a id="org42d384c"></a>

Querying the ontology

img

<a id="org1a05e36"></a>

Making a diagram

img

img

img

<a id="org5fd6ef7"></a>

Display labels instead of identifiers

ELOT can display readable labels instead of prefixed identifiers (which are unreadable if the identifiers are not informative), and offers quick search across the ontology resources.

img