SWAT Ontology Verbaliser

This site makes available the Prolog code of the SWAT ontology verbaliser.

The program takes as input an OWL ontology in XML format. As output it produces three texts of increasing sophistication:

  1. Plain text with no aggregation. Axioms are verbalised separately by English sentences.
  2. Plain text with aggregation, so that related axioms might be presented in the same sentence.
  3. Organised navigable hypertext.

The latter is the best option for readers wishing to overview the content of the ontology.

Here are excerpts from a typical input and output for the well-known wines ontology.

INPUT: ontology in XML format

OUTPUT: navigable hypertext

The verbalisation requires no linguistic resources, only the ontology source in XML format. Phrases that name individuals, classes and properties are inferred from the names/labels used in the OWL code. If these are unsuitable, the output will be correspondingly degraded. You will find some incorrect or clumsy phrases in the example above, such as Usregion rather than US region: the program does not know enough to infer that US should be a separate word.

Despite such errors, the verbaliser outputs are usually much shorter and easier to understand than the OWL code.

Download

You can download a zipped directory of SWI Prolog code with examples (download ZIP file).

You will find licensing information, and instructions for use, in the file readme.txt.

Briefly, the Prolog code is provided in a main directory with two sub-directories for ontology source files and text output. Open a command tool in the main directory, fire up SWI prolog, load the file named main.pl, put one or more ontologies in the ontology sub-directory, run the program using main/0 or main/1, and view the output files in a web browser.

For ontologies in other formats, convert to OWL/XML format using the Manchester OWL Syntax Converter.

Ontopedia

You can also run a program that produces an encyclopedia-style index across several ontologies. This will group together individuals/classes from different ontologies if their names overlap. For instructions see readme.txt. The concept is explained in the paper below; see also the Ontopedia page for examples.

Papers

Sandra Williams, Allan Third and Richard Power (2011) Levels of organisation in ontology verbalisation. Proceedings of the 13th European Workshop on Natural Language Generation, September 2011, Nancy, France. [pdf]

Richard Power, Allan Third and Sandra Williams (2011) Ontopedia: a natural language index to large repositories of ontologies. Unpublished paper. [pdf]


Contact: Richard Power
More information: Open University SWAT project page
Last modified: June 2017

Accessibility