Reasonable Ontology Templates (OTTR)
top
examples:
/
Contents
Reasonable Ontology Templates (OTTR)
Reasonable Ontology Templates (OTTR) is a language with supporting tools for representing and instantiating RDF graph and OWL ontology modelling patterns. It is designed to improve the efficiency and quality of building, using, and maintaining knowledge bases.
Latest news
For more news, see the news archive.
- 2023-11-09
- Grundfos' Industrial Ontology Engineering Platform uses OTTR. Read all about it in their ISWC 2023 industry paper: Building an Industrial Ontology Engineering Platform, and in https://medium.com/wallscope/developing-ontology-tools-with-grundfos-d84a961bd4cd.
- 2023-11-07
- Moritz Blum et al. shares Insights from an OTTR-centric Ontology Engineering Methodology at WOP@ISWC2023.
- 2022-08-17
- On 2022-08-31 we are giving a talk on OTTR at OntoCommons Workshop on Ontology Engineering and Knowledge Graphs tool ecosystem. Registration is free and open!
- 2022-08-15
- Our paper on abbreviations for complex OWL expressions has been accepted at KGSum 2022.
- 2022-07-08
- Our paper on syntactic modelling structures in ontologies [1] has been accepted at ISWC 2022.
- 2022-04-04
- Please register for the 3nd OTTR user forum which will take place physically and co-located with the general assembly of SIRIUS.
- 2022-03-16
- We are very happy to see that Veronika Heimsbakk, CapGemini is giving a tutorial on OTTR and a talk on the use of OTTR "Growing Your Graph With OTTR" at The Knowledge Graph Conference (https://www.knowledgegraph.tech/) More information here:
Introduction and Overview
Reasonable Ontology Templates (OTTR) is a framework and language for representing ontology modelling patterns, and is designed to support interaction with OWL or RDF knowledge bases at a higher level of abstraction, using modelling patterns rather than OWL axioms or RDF triples. This includes:
- building knowledge bases by instantiating templates;
- communicating (presenting, transferring and visualising) the knowledge base as a set of template instances at different levels of abstraction; and
- securing and improving the quality and sustainability of the knowledge base via structural and semantic analysis of the templates used to construct the knowledge base.
OTTR templates and instances can be represented in stOTTR—a custom-built format similar to and based on RDF Turtle—or in RDF using the wOTTR vocabulary. Instances may also be generated from spreadsheets using tabOTTR or with mappings over various queryable sources using bOTTR. Our reference implementation Lutra supports these formats, and a web interface WebLutra is available for testing. See also the interactive examples below.
The project is in active development.
Template instances
The Pizza ontology is a well-known OWL tutorial ontology. The ontology models the domain of pizzas and contains many specific types of pizzas, such as Margherita. The Margherita pizza is modelled as subclass of NamedPizza, originating from Italy and having exactly the toppings Tomato and Mozzarella, here shown in Manchester syntax:
Class: Margherita SubClassOf: NamedPizza, hasCountryOfOrigin some { Italy }, hasTopping some Mozzarella, hasTopping some Tomato, hasTopping only (Mozzarella or Tomato)
The ontology contains 22 such types of pizzas, all following the same modelling pattern as the Margherita pizza. Since this pattern is not represented as a pattern (as no such concept exists in OWL), tasks that are important for the efficient use and management of the ontology, such as finding pattern instances, verifying consistent use of the pattern, and updating the pattern, may require considerable repetitive and laborious effort.
Using OTTR, we can record the pattern as an OTTR template, called,
o-pizza:NamedPizza
, which takes 3 arguments: the name or IRI, an optional
country of origin, and a list of toppings; and easily make multiple
instances of the pattern. Click "Run" below to expand the instances using
WebLutra.
The design of the pattern, the OTTR template, is kept in a single location definition and can be updated without changing the instances of the templates (unless the input arguments must also be updated). In the above example the template definition is fetched from its IRI address when the instances are expanded.
This screen recording shows how the example is expanded with our reference implementation Lutra.
Language features
The OTTR template language has the following core constructs and features:
- A template identifies and captures a modelling pattern as a parameterised RDF graph or OWL ontology pattern.
- A template instance represents a replica of the template which replaces the template's parameters with the instance's arguments.
- A template definition may be nested, i.e., a template is specified from other templates.
- Template parameters may be
- typed—specifying the permissible type/datatype of arguments
- set to be optional, allowing missing arguments,
- set to be non-blank, disallowing a blank node as argument, and
- be given a default value.
- Template instances accept any RDF resource as argument, including lists.
- List expanders support iterating over list arguments, supporting compact specification of multiple template instances.
Template definition
The NamedPizza
template is listed below in the "library" box of the form
(using a different IRI than the above example to avoid conflict).
The first line contains the signature of the template. It specifies
the template name and its parameters. The parameters can be
typed and set as non-optional or optional, e.g., the ?country
parameter optionally takes an individual as argument, and the
?toppings
parameter is not optional and takes a non-empty list of
classes.
The remaining lines is the body of the template, and specifies
the pattern that the template represents, by instantiating other
templates. All these instances model common OWL axioms. The cross
is
a list expander specifying that an instance of the
SubObjectSomeValuesFrom
template will be created for each element in
the ?toppings
list argument. Note that the ?toppings
list argument is
also used (now as a list) to create a OWL union class which is used as
qualifier for the SubObjectAllValuesFrom
axiom in.
Click "Run" to expand the instances.
This screen recording shows how the example is expanded with Lutra.
Benefits
We believe the benefits of using OTTR are many:
- Better abstractions
- The use of templates as building blocks for knowledge bases makes knowledge bases easier to understand and work with since modelling constructs are expressed using patterns at a suitable abstraction level rather than with low-level RDF triples or OWL axioms.
- Uniform modelling
- Knowledge bases built using a well-designed template library makes its modelling more uniform, which can greatly improves its ease of use and maintenance.
- Modular, encapsulated patterns
- The fact that templates can be defined by referring to other templates follows the don't repeat yourself (DRY) principle, and leads to templates that are easier to maintain and, in many cases, easier to understand.
- Separation of design and content
- Instantiable template naturally establishes a clear separation between the design of the knowledge base—represented by templates, and the bulk content of the knowledge base—represented by template instances. The templates and the template instances can then typically be managed by different competencies and tools: templates are managed by ontology experts using specialised tooling such as ontology editors and reasoners, while templates instances are created by domain experts using tools they are familiar with, e.g., spreadsheets.
- Open standards support
- OTTR is designed to work smoothly with relevant core W3C standards, such as RDF, OWL, SPARQL, XML, XSD, SAWSDL, XSLT. (For the XML standards family only rudimentary prototypes have been tested.)
- Publish, share and reuse
- Templates can be published and shared using common web publishing practices, such as Best Practices for Publishing Linked Data.
- Tool support for maintenance
- The formal basis of OTTR template, i.e., RDF graphs and OWL ontologies, allow templates to be analysed and quality assessed using OWL reasoners, but also using well-known ideas from software engineering, such as identifying redundancies and suggesting refactoring for poorly integrated templates.
Tool and language support
Templates and instances can be serialised as ordinary RDF graphs and OWL ontologies using a dedicated OWL vocabulary, called wOTTR. This allows templates and instances to be constructed, stored, edited and quality assessed using existing W3C languages and tools, such as OWL reasoners, SPARQL query engines and RDF triple stores.
RDF/OWL serialisation
In the preceding examples we have used the serialisation called stOTTR that is made for compactly representing template and instances.
There is also a OWL vocabulary, wOTTR, for representing OTTR templates and instances. The RDF/OWL serialisation of the NamedPizza template is seen below, in a compacted version. It is published at its IRI http://tpl.ottr.xyz/pizza/0.1/NamedPizza.
Lines 1–6 contain the template signature, while the remaining lines contain the template pattern.
1: o-pizza:NamedPizza a ottr:Template ; 2: ottr:parameters ( 3: [ ottr:variable _:b0 ; ottr:type owl:Class ; ] 4: [ ottr:variable _:b1 ; ottr:type owl:NamedIndividual ; ottr:modifier ottr:optional ] 5: [ ottr:variable _:b2 ; ottr:type ( ottr:NEList ottr:IRI ) ] 6: ) ; 7: ottr:pattern 8: [ ottr:of ax:SubObjectAllValuesFrom 9: ottr:arguments ( _:b0 pz:hasTopping _:b3 ) ] , 10: [ ottr:of ax:SubClassOf 11: ottr:arguments ( _:b0 pz:NamedPizza ) ] , 12: [ ottr:of rstr:ObjectUnionOf 13: ottr:arguments ( _:b3 _:b2 ) ] , 14: [ ottr:of ax:SubObjectSomeValuesFrom ; 15: ottr:modifier ottr:cross ; 16: ottr:arguments ( 17: [ ottr:value _:b0 ] 18: [ ottr:value pz:hasTopping ] 19: [ ottr:modifier ottr:listExpand ; ottr:value _:b2 ] 20: ) 21: ] , 22: [ ottr:of ax:SubObjectHasValue 23: ottr:arguments ( _:b0 pz:hasCountryOfOrigin _:b1 ) ] .
Other serialisation formats are available for representing templates and instances, see Specifications.
Instances in Excel
tabOTTR is a small "markup" language for tabular formats such as Excel used to specify template instances.
Below is a example showing the same instances given in an example over. The rows 1–4 specify the input format of the instances given in rows 5–6.
1 | #OTTR |
template |
http://tlp.ottr.xyz/pizza/0.1/NamedPizza |
2 | 1 |
2 |
3 |
3 | iri |
iri |
iri+ |
4 | Pizza |
Country |
Toppings |
5 | Margherita |
Italy |
Mozzarella | Tomato |
6 | Hawaii |
Cheese | Ham | Pineapple |
|
7 | #OTTR |
end |
The spreadsheet PizzaOntologyInstances.xlsx contains several instances of the NamedPizza template.
Try to download the spreadsheet and expand it using the form below.
This screen recording shows how the example is expanded with Lutra.
Extracting instances from queryable sources
bOTTR is a language for specifying mappings between queries over the sources to given templates. bOTTR hence allows multiple data sources on different formats to be integrated via OTTR templates into a single RDF/OWL representation.
bOTTR currently supports queries over JDBC, including CSV files, and SPARQL queries (over SPARQL endpoints and RDF files).
The following map instantiates the NamedPizza template by querying the PizzaOntology.
Lutra
Lutra is our open source (LGPL licence) reference implementation of the OTTR language. Lutra can read and write OTTR templates and instances on different serialisation formats, and expand instances into regular RDF graphs. Lutra is written in Java and is available as a command line interface, and as feature limited version web application: https://weblutra.ottr.xyz/
This is the command line interface of Lutra:
java -jar lutra.jar --version java -jar lutra.jar --help
0.6.19 Usage: lutra [-fhV] [--debugStackTrace] [--quiet] [--stdout] [-F=<fetchFormat>] [--haltOn=<haltOn>] [-I=<inputFormat>] [-L=<libraryFormat>] [-m=<mode>] [--messageLinePrefix=<linePrefix>] [-o=<out>] [-O=<outputFormat>] [-p=<prefixes>] [-e=<extensions>[, <extensions>...]]... [-E=<ignoreExtensions>[, <ignoreExtensions>...]]... [-l=<library>]... [<inputs>...] DESCRIPTION: Reference implementation for OTTR Templates. Use for expanding template instances and template definitions, translating between different formats and for checking the integrity of template libraries. PARAMETERS: [<inputs>...] Files of instances to which operations are to be applied. OPTIONS: --debugStackTrace This enables printing a regular java stack trace for error messages.Enabling this flag will not deteriorate performance. default: false) -e, --extension=<extensions>[,<extensions>...] File extension of files to use as input to template library. (default: []) -E, --ignoreExtension=<ignoreExtensions>[,<ignoreExtensions>...] File extensions of files to ignore as input to template library. (default: []) -f, --fetchMissing Fetch missing template dependencies. It is here assumed that templates' definitions are accessible via their IRI, that is, the IRI is either a path to a file, a URL, or similar. (default: false) -F, --fetchFormat=<fetchFormat> The input format of the templates fetched via the -f flag (registered formats: wottr, stottr) -h, --help Show this help message and exit. --haltOn=<haltOn> Halt execution upon receiving messages with a severity equal to or greater than this value. (legal values: INFO, WARNING, ERROR, FATAL; default: ERROR) -I, --inputFormat=<inputFormat> Input format of instances. (registered formats: wottr, stottr, tabottr, bottr default: wottr) -l, --library=<library> Folder containing templates to use as library. Can be used multiple times for multiple libraries. -L, --libraryFormat=<libraryFormat> The input format of the libraries. If omitted, all available formats are attempted. (registered formats: wottr, stottr) -m, --mode=<mode> The mode of operation to be applied to input. (legal values: expand, expandLibrary, format, formatLibrary, lint, checkSyntax, docttrLibrary; default: expand) --messageLinePrefix=<linePrefix> Set line prefix for output messages (use e.g. '#' to make output become comments). (default: ) -o, --output=<out> Path for writing output. -O, --outputFormat=<outputFormat> Output format of output of operation defined by the mode. (registered formats: wottr, stottr, tabottr, bottr; default: wottr) -p, --prefixes=<prefixes> Path to RDF file containing prefix declarations to be used when rendering output. Any other data in the file is read, but ignored. --quiet Suppress all messages, including errors and warnings. (default: false) --stdout Print system of operations to standard out. (default: false) -V, --version Print version information and exit. LINKS: Website: https://ottr.xyz Primers: https://primer.ottr.xyz Git repo: https://gitlab.com/ottr/lutra/lutra
Specifications
The OTTR language is formally defined in a series of specifications listed below. For a more light-weight introduction to OTTR, visit the primer: https://primer.ottr.xyz
- Concepts and Abstract Model for Reasonable Ontology Templates (mOTTR)
- mOTTR defines the fundamentals of OTTR.
- Release: https://spec.ottr.xyz/mOTTR/0.1/
- Development: https://dev.spec.ottr.xyz/mOTTR/
- Adapting Reasonable Ontology Templates to RDF (rOTTR)
- rOTTR specifies how mOTTR is adapted to fit the RDF.
- Release: https://spec.ottr.xyz/rOTTR/0.2/
- Development: https://dev.spec.ottr.xyz/rOTTR/
- Web Reasonable Ontology Templates (wOTTR)
- wOTTR
defines a RDF serialisation format for OTTR.
- Release: https://spec.ottr.xyz/wOTTR/0.4/
- Development: https://dev.spec.ottr.xyz/wOTTR/
- Terse Syntax for Reasonable Ontology Templates (stOTTR)
- stOTTR defines a compact serialisation format for OTTR, aimed
to be easy to read and write.
- Release: https://spec.ottr.xyz/stOTTR/0.1/
- Development: https://dev.spec.ottr.xyz/stOTTR/
- Tabular Reasonable Ontology Template Instances (tabOTTR)
- tabOTTR defines a input format for bulk OTTR template
instantiation for tabular file formats such as CSV, TSV and
Excel spreadsheets.
- Release: https://spec.ottr.xyz/tabOTTR/0.3/
- Development: https://dev.spec.ottr.xyz/tabOTTR/
- Batch Instantiation of OTTR templates (bOTTR)
- An Extract-Transform-Load (ETL) mapping language for
instantantiating OTTR templates from existing external sources.
- Release: https://spec.ottr.xyz/bOTTR/0.1/
- Development: https://dev.spec.ottr.xyz/bOTTR/
Template library
A library of published OTTR templates is available at tpl.ottr.xyz.
This library contains many templates that model common patterns for the W3C standards OWL, RDFS and RDF. The library also includes other more complex patterns that are useful for understanding how OTTR templates may be built and used.
Our intention is that this library will grow to contain OTTR templates for many useful patterns and for many prominent vocabularies. A set of guidelines for managing the library is under development.
Note: The library of templates in the "legacy" version of the wOTTR
format is now outdated and no longer available through the service
at library.ottr.xyz
. However, they are still available at their
IRI, and at the archived repositories
https://gitlab.com/ottr/candidate/ and
https://gitlab.com/ottr/draft/.
Methodology
We have yet to properly specify and formally evaluate a tool-supported methodology for the development and maintenance of knowledge bases using OTTR templates. However, we believe the abstraction mechanism that OTTR templates provide can work in a similar manner as application programming interfaces (APIs) work for programming and software engineering. We anticipate the following roles for such a methodology:
- Template library designer
- This is the designer and maintainer of the basic and core template libraries. The job of the library designer is to construct well-designed interfaces, i.e., capture modelling patterns using OTTR templates, for basic RDF and OWL vocabularies, such as the RDF and OWL vocabularies themselves, but also other vocabularies like SKOS, Dublin Core, BFO, and possibly also special purpose vocabularies like Galen where ontological expertise is required to correctly understand the vocabulary. Hence, this role requires good insight into the underlying logical languages, i.e., RDF and OWL, and the OTTR language. There is currently no special-purpose editor for this role; we recommend that you use your favourite text-editor to create templates "by hand" in stOTTR syntax, and use Lutra to check the correctness of your templates.
- Template programmer
- The job of the template programmer is to bridge the abstractions over the logical vocabulary created by the template library designer with the conceptualisation of domain experts. The is achieved by creating user-facing templates that combine and restrict already existing templates available in template libraries, to create new templates that capture specific modelling patterns for given tasks. The programmer must have a firm grasp on the users' needs and task, but need "only" to understand the templates in the library and to lesser extent understand the formal logic that underlies these templates. This requires that the templates in the library are well-documented. The user-facing templates form the interface for data input (and possibly output) that is presented to the domain expert. There is currently no tool support for this role, other than what is available to the library designer. We have ideas for a standalone tool to support the template programmer.
- Domain expert
- The domain expert is equipped by the template programmer with a well-designed set of user-facing templates. However, for the domain expert these templates present themselves only in the form of structurally simple spreadsheet formats, i.e., tabular forms with column headers and explanations. We assume that it is possible to create such formats that lie close to the domain experts existing conceptualisation of the domain. This would make them easy to understand and use. "Using" means here 1) creating template instances by filling in data row in the tabular format, or 2) using the format as a query, in which the results of the query will be presented as data rows in the same format. The tabOTTR specification and Lutra provide support for this user role.
An input format prepared by the template programmer and filled with data by the domain expert can, using the template expansion mechanism, be consistently translated into a knowledge base using the vocabulary prescribed by the templates. The separation of responsibility between the roles allows a single template library designer to serve multiple template programmers, which in turn can serve multiple domain experts. This fits the skill and tools sets that information modelling projects typically have available, e.g., domain experts are used to working with spreadsheets and rarely have the competence required for working with ontology editors, while there are usually fewer people that have the required logical background and competence for building and maintaining semantic knowledge bases.
Development
The technology surrounding and theory underlying OTTR is under active development, and the use of OTTR templates for construction of sustainable knowledge bases is gaining industrial interest.
All our publicly available development is available at GitLab: gitlab.com/ottr, where our work is organised into different subgroups and repositories:
Our future plans are to develop:
- new version of Lutra with increased performance and with a code-base that is better suited for template library analysis
- formal specification of OTTR serialisation formats
- better understanding of industrial requirements
- updated template library and library maintenance procedures and tools
- translating templates to SPARQL queries
- improved techniques for template library analysis
- specialised tools for designing templates
- visualisation and presentation tools for templates
- formalised methodology for constructing ontologies
- support for more input data formats
We have also done experimental work on:
- translating templates to SAWSDL annotated XSD format descriptions
- translating templates to XSLT transformations from XML on generated XSD formats to expanded RDF/XML
Theoretical foundation
Different theoretical foundations for OTTR templates have been examined:
- OTTR templates as RDF macros [4]
- OTTR templates as parameterised description logic knowledge bases [8]
For the implemented version of OTTR templates, which is the version presented throughout these webpages, we consider OTTR templates as RDF macros: The OTTR template functionality is implemented as a recursive, non-cyclic macro mechanism for RDF statements, where OTTR template instances are unfolded into a regular RDF or RDF/OWL knowledge base by recursively replacing template instances with their definition. This process terminates with a set of base templates that directly represent a knowledge base on RDF or RDF/OWL format.
For more information, check out our Publications.
Publications
Our publications are listed below grouped according to topic and sorted after publication year.
The OTTR Framework
- Martin G. Skjæveland, Daniel P. Lupp, Leif Harald Karlsen, Johan W. Klüwer: OTTR: Formal Templates for Pattern-Based Ontology Engineering. 349-377. In "Advances in Pattern-based Ontology Engineering", Studies on the Semantic Web 51, IOS Press 2021, ISBN 978-1-64368-174-0.
Martin G. Skjæveland. The OTTR Template Library. In "Advances in Pattern-based Ontology Engineering", Studies on the Semantic Web 51, IOS Press 2021, ISBN 978-1-64368-174-0. Presented at the 11th Workshop on Ontology Design and Patterns - WOP2020, co-located with 19th International Semantic Web Conference (ISWC 2020).
Abstract
Reasonable Ontology Templates (OTTR) is a framework for representing encodings of ontology patterns and aimed to increase the efficiency and quality of ontology engineering. This paper presents the current status and future ideas of the main public library of OTTR templates. We describe the current contents of the library, the rationale behind how templates are versioned and managed over their lifetime, how templates are documented and published, and the technical solution used.
Daniel P. Lupp, Melinda Hodkiewicz, and Martin G. Skjæveland. Template Libraries for Industrial Asset Maintenance: A Methodology for Scalable and Maintainable Ontologies. In: Thorsten Liebig, Achille Fokoue, Zhe Wu (eds) Proceedings of the 13th International Workshop on Scalable Semantic Web Knowledge Base Systems co-located with 19th International Semantic Web Conference (ISWC 2020). CEUR. http://ceur-ws.org/Vol-2757/. 2020.
Abstract
Data in engineering industries is highly standardized and informationdense, and usually distributed across many different sources with incompatible formats and implicit semantics. As such, it provides an ideal use case for application of semantic technologies for data integration and access. However, adoption of semantic technologies is hampered due to the complex set of competencies required to construct a scalable and maintainable ontology. We present a methodology for aiding domain experts and ontology engineers in constructing and maintaining industry-viable ontologies using a template-based approach for ontology modeling and instantiation. Using the OTTR framework, the structure of the input formats and the semantics of the target domain are modeled and maintained in separate modularized template libraries. Data provided by domain experts is mapped to these templates, allowing end-users to extend and amend the model without the need to directly interact with semantic technology languages and tools. Our approach is demonstrated on a real-world use case from the asset maintenance domain which has applicability to a wide range of industries.
Martin G. Skjæveland, Daniel P. Lupp, Leif Harald Karlsen, and Henrik Forssell. Practical Ontology Pattern Instantiation, Discovery, and Maintenance with Reasonable Ontology Templates In: Vrandečić D. et al. (eds) The Semantic Web—ISWC 2018. ISWC 2018. LNCS vol 11136. Springer. 2018. Nominated for best research paper award.
Abstract
Reasonable Ontology Templates (OTTR) is a language for representing ontology modelling patterns in the form of parameterised ontologies. Ontology templates are simple and powerful abstractions useful for constructing, interacting with, and maintaining ontologies. With ontology templates, modelling patterns can be uniquely identified and encapsulated, broken down into convenient and manageable pieces, instantiated, and used as queries. Formal relations defined over templates support sophisticated maintenance tasks for sets of templates, such as revealing redundancies and suggesting new templates for representing implicit patterns. Ontology templates are designed for practical use; an OWL vocabulary, convenient serialisation formats for the semantic web and for terse specification of template definitions and bulk instances are available, including an open source implementation for using templates. Our approach is successfully tested on a real-world large-scale ontology in the engineering domain.
Martin G. Skjæveland, Daniel P. Lupp, Leif Harald Karlsen, and Henrik Forssell. Practical Ontology Pattern Instantiation, Discovery, and Maintenance with Reasonable Ontology Templates—Demo paper. International Semantic Web Conference (P&D/Industry/BlueSky) 2018
Abstract
Reasonable Ontology Templates (OTTR) is a language for representing ontology modelling patterns in the form of parameterised ontologies. Ontology templates are simple and powerful abstractions useful for constructing, interacting with and maintaining ontologies. The templates’ simple yet formally precise structure allows for formal relations to be defined over templates, supporting sophisticated maintenance tasks for template libraries such as revealing redundancies and suggesting new templates for representing uncaptured modelling patterns.
Martin G. Skjæveland, Henrik Forssell, Johan Wilhelm Klüwer, Daniel P. Lupp, Evgenij Thorstensen and Arild Waaler. Pattern-Based Ontology Design and Instantiation with Reasonable Ontology Templates. Research paper presented at 8th Workshop on Ontology Design and Patterns - WOP2017. 2017.
Abstract
Reasonable Ontology Templates, OTTR s for short, are OWL ontology macros capable of representing ontology design patterns (ODPs) and closely integrating their use into ontology engineering. An OTTR is itself an OWL ontology or RDF graph, annotated with a special purpose OWL vocabulary. This allows OTTR s to be edited, debugged, published, identified, instantiated, combined, used as queries and bulk transformations, and maintained---all leveraging existing W3C standards, best practices and tools. We show how such templates can drive a technical framework and tools for a practical, efficient and transparent use of ODP s in ontology design and instantiation. The framework allows for a clear separation of the design of an ontology, typically managed by ontology experts, and its bulk content, provided by domain experts. We illustrate the approach by reconstructing the published Chess Game ODP and producing linked chess data.
Martin G. Skjæveland, Henrik Forssell, Johan W. Klüwer, Daniel P. Lupp, Evgenij Thorstensen, Arild Waaler. Reasonable Ontology Templates: APIs for OWL. Poster paper presented at International Semantic Web Conference. 2017
Abstract
Reasonable Ontology Templates, OTTRs for short, are OWL ontology macros capable of representing ontology design patterns (ODPs) and closely integrating their use into ontology engineering. An OTTR is itself an OWL ontology or RDF graph, annotated with a special purpose OWL vocabulary. This allows OTTR s to be edited, debugged, published, identified, instantiated, combined, used as queries and bulk transformations, and maintained---all leveraging existing W3C standards, best practices and tools. We show how such templates can drive a technical framework and tools for a practical, efficient and transparent use of ontology design patterns in ontology design and instantiation.
Henrik Forssell, Daniel P. Lupp, Martin G. Skjæveland, Evgenij Thorstensen. Reasonable Macros for Ontology Construction and Maintenance. Poster paper presented at the Description Logics workshop. 2017
Abstract
Creating and maintaining ontology knowledge bases are difficult processes that can be improved by using macro or templating languages that help structure the ontology engineering task and reduce unnecessary repetitions of ontology patterns. However, since the templates themselves need to be created and maintained, suitable tool support for their maintenance is vital in order to ensure the quality of the resulting knowledge base, and to lower the cost of its construction and maintenance. In this paper, we show that a simple and powerful macro or templating language for description logic (DL) knowledge bases can be defined in description logic itself. In other words, DL allows for macros that are themselves DL knowledge bases; maintenance and debugging for such macros can therefore be done using existing DL reasoners, and does not require extra tool support. We define such macros for the DL SROIQ, which underlies the W3C standard OWL 2. We then show that notions of containment and other problems of interest for such macros become standard reasoning problems supported by existing reasoners. We explore the uses of such macros, showcase how they can be used as restricted higher-order queries, and apply our insights to the setting of data exchange.
Foundations for Pattern-based ontology engineering
- Christian Kindermann, Martin G. Skjæveland. A Survey of Syntactic Modelling Structures in Biomedical Ontologies In: Monin P. et al. (eds) The Semantic Web—ISWC 2022. ISWC 2022. LNCS to appear.
- Christian Kindermann, Daniel P. Lupp, Martin G. Skjæveland, Leif Harald Karlsen: Formal Relations over Ontology Patterns in Templating Frameworks. 120-133. In "Advances in Pattern-based Ontology Engineering", Studies on the Semantic Web 51, IOS Press 2021, ISBN 978-1-64368-174-0.
Daniel P. Lupp, Leif Harald Karlsen, and Martin G. Skjæveland. Making a Case for Formal Relations over Ontology Patterns. Short paper presented at 9th Workshop on Ontology Design and Patterns - WOP2018. 2018.
Abstract
There have recently been multiple frameworks proposed to formalize the definition and instantiation of recurring patterns for ontology construction and maintenance. Such formal frameworks can also provide the means necessary for discussing how such patterns can be related to one another, both syntactically and semantically. This has the potential for organizing pattern libraries, robust handling of maintenance tasks, such as redundancy removal, and defining heuristics for what constitutes a “good” pattern. This short paper aims to provide a common ground for discussions on formal relations between ontology patterns. We discuss interesting relations with motivating examples as well as state open questions concerning relations for optimizing the creation, instantiation, and maintenance of ontology patterns.
Christian Kindermann, Daniel P. Lupp, Uli Sattler, Evgenij Thorstensen. Generating Ontologies from Templates: A Rule-Based Approach for Capturing Regularity In: Description Logics 2018. 2018.
Abstract
We present a second-order language that can be used to succinctly specify ontologies in a consistent and transparent manner. This language is based on ontology templates (OTTR), a framework for capturing recurring patterns of axioms in ontological modelling. The language, and our results are independent of any specific DL. We define the language and its semantics, including the case of negation-as-failure, investigate reasoning over ontologies specified using our language, and show results about the decidability of useful reasoning tasks about the language itself. We also state and discuss some open problems that we believe to be of interest.
Use cases
- Laura Ann Slaughter, Leif Harald Karlsen, Eveliina Päivikki Kallioniemi, Martin Georg Skjæveland. Reusable Ontology Modelling Patterns for Biodiversity Data with Reasonable Ontology Templates (OTTR) Biodiversity Information Science and Standards 6: e93939, doi: https://doi.org/10.3897/biss.6.93939 (24 Aug 2022). Extended abstract presented at The Biodiversity Information Standards (TDWG) 2022.
- Martin G. Skjæveland, Anders Gjerver, Christian M. Hansen, Johan Wilhelm Klüwer, Morten R. Strand, Arild Waaler, Per Øyvind Øverli. Semantic Material Master Data Management at Aibel Industry paper presented at ISWC 2018.
Master theses
Snilsberg, Erik. Reverse OTTR: A query language for RDF. University of Oslo. 2022.
Abstract
Reasonable Ontology Templates (OTTR) is a recent template language for the modelling -and construction- of RDF knowledge graphs, which aims to tackle the issue that RDF itself is too low level for practical use. By emphasising useful design-principles, such as abstraction levels and the "Don't Repeat Yourself''-principle (DRY), OTTR is a promising solution, for which the industry has shown great interest. This thesis investigates the potential for the use of OTTR as a query language. OTTR templates model RDF graph patterns, and in the process known as expansion, constructs graphs from these patterns. Based on the idea that the reversal of the expansion process describes a query language for RDF graphs, this project formally defines Reverse OTTR, a query language for RDF with OTTR syntax. To this end, we first provide a formalization of the expansion process of OTTR and use this formalisation as the basis for the formalization of Reverse OTTR. Then, we formally show by structural induction how the input and output of the two languages relate, justifying the name of the language. Finally, we present a proof-of-concept implementation of Reverse OTTR and an experiment, which showcases the performance of the naive implementation for various language features.
Marlen Jarholt. Frog: Functions for ontologies — An extension for the OTTR-framework. University of Oslo. 2022.
Abstract
Reasonable Ontology Templates (OTTR) is a language making it possible to compose parameterised modelling patterns, known as templates, that we can instantiate to produce an RDF graph and OWL ontologies. Hence, removing the repetitive and time-consuming processes of producing RDF graphs over a domain. Using OTTR offers several benefits compared to pure RDF: the Don't repeat yourself (DRY) principle, better abstraction, uniform modelling, and separation of design and content. To instantiate templates, we often use bOTTR and tabOTTR, which extract data from a tabular file or data sources. OTTR templates can not perform calculations on argument terms. Consequently, we need to perform calculations over terms before instantiating them. Therefore, the sources that bOTTR and tabOTTR extract data from need to perform necessary calculations. Each source type has different means to create calculations, thus, resulting in several ways of manipulations for the same calculation. We believe that making it possible to have one uniform means of performing calculations in templates will strengthen OTTR's aforementioned benefits. Therefore, in this thesis, we design and implement a programing language, Frog, that can perform manipulations inside templates, which aims to integrate with OTTR seamlessly. Moreover, we evaluate if including a language like Frog into OTTR enhances the acclaimed benefits.
Shanshan Qu. Visual Construction of Ontology Templates. University of Oslo. 2022.
Abstract
OTTR is a powerful language for representing ontology modelling patterns. It is intended to improve the efficiency and quality of building and maintaining knowledge bases. Now, it is becoming more popular in industry to utilize OTTR templates to construct sustainable knowledge bases. As a result, a graphical language with visualization tools for OTTR templates is needed to lower the barrier for the adoption by a wider range of users. A visual language for OTTR templates developed on UML principles with certain adjustments is the core contribution of the thesis. The suggested visual language is a two-dimensional visualization that could be categorized as a UML-style node-link visualization. To evaluate the UML-based visualization, the nine principles of PoNT have been used as a basic guideline. A survey with user participation was carried out in order to test both the usability and the performance of this UML-based visual language. The analysis of the survey results has shown that our UML-style node-link visualization is an acceptable visualization even though it is not the best solution. In addition, a Java desktop application to translate the OTTR templates into visualization is also part of the contribution.
Victoria Varzhel. Exploring the Use of Ontologies and Reasonable Ontology Templates (OTTR) within Health Registry Systems. University of Oslo. 2019.
Abstract
In this thesis we explored the use of ontologies and Reasonable Ontology Templates (OTTR) within the context of health registries in Norway. We contributed to further knowledge about this topic by reusing the existing ontologies and applying OTTR templates to a real-life case - health registries. The project starts with presenting the theoretical background about ontologies, their components and languages, ontology reuse, design patterns and OTTR. The presented use case is the use of health registries in Norway. Responsibility for the national registries is shared among different institutions, which results in lack of standardisation and data quality.
To answer the research questions, we reused the PICO and CSEO ontologies and designed the OTTR templates for the health registry variables. Results demonstrated that (1) reuse of biomedical ontologies occurs through merging ontologies and their modules, but it entails manual effort from both an ontology engineer, and a domain expert; (2) despite some issues, the OTTR templates can be applied to the real life case of health registry variables. The created templates can potentially be used in a registry builder application where templates will be used to construct an OWL file with the necessary variables for the registry.
Videos
Presentation: Motivation and Overview
The aim of this screencast is to give a brief, but reasonably complete overview of what OTTR is, and pointers to more information.
The screencast contains three parts; first, we motivate the need for a template mechanism for ontology and knowledge base engineering. Then, we present the Reasonable Ontology Templates framework, show examples and explain its the features and benefits. We end by giving pointers to more information.
The presentation contains few technical details and should be easy to follow for anyone with basic understanding of RDF and OWL.
The presentation is by Martin G. Skjæveland.
Lecture: The (language) basics of OTTR
This is part of a lecture given in the course IN3060 Semantic Technologies given at the University of Oslo, spring 2021. The video assumes only a very basic knowledge of the OTTR framework and covers all the basics of the language constructs of OTTR in some depth. The lecture is given by Leif Harald Karlsen.
Live coding session: Incrementally building a template library
The video shows live coding demo session of a top-down approach for building a template library for a example use case. The chapter assumes the reader is familiar with the basics of OTTR. The coding session is using in emacs and a major mode for emacs (see https://gitlab.com/ottr/pub/emacs-stottr-mode) that defines syntax highlighting for the stOTTR syntax and basic functionality from the standard Lutra CLI (the reference implementation of the OTTR project). The coding session is done by Daniel Lupp.
Presentation: The Core OTTR template library
Presentation of the core OTTR template library, available at http://tpl.ottr.xyz, design principles, content, structure, documentation and technical platform. By Martin G. Skjæveland.
Presentation: Ontology patterns for industrial ontologies: The READI use case
Presentation by Johan W. Klüwer and Martin G. Skjæveland for SemWeb.Pro 2020: https://semweb.pro/semwebpro-2020.html.
Abstract
Our presentation will describe how requirements management in capital industries can benefit from ontology-based methods. Our use case is the READI Joint Industry Project in digitalised requirements for the Norwegian Continental Shelf (offshore Oil and Gas). We propose a new kind of service, integrating industrial ontologies with the templates needed to use them correctly.
READI aims to improve the specification, implementation, and verification of requirements. A particular aim is to evolve the INCOSE guidelines for writing requirements, so that recent innovations in intelligent data can be exploited. READI uses ontologies, following W3C's OWL 2 standard in the intended way, where constraints are subject to precise Description Logic reasoning. This will support and partially automate work processes, improving development and use of requirements across design and operations.
To provide a common, shared language of industrial assets and processes in the form of OWL ontologies is crucial. This requires a broad-ranging collaborative effort between subject matter experts and ontology modellers; while challenging, the approach has already been proven successful in capital projects. We obtain a clear separation between a generic vocabulary (classes and relations), requirements expressed using the vocabulary (norms as rules), and industrial assets described with the vocabulary (individual instances).
Agreement on common terminology is however not enough. We also need to ensure that the vocabularies are applied in a uniform way. To this end, READI adopts the Reasonable Ontology Templates (OTTR) language and framework. Ontology patterns are developed to match the kinds of facts that need to be formalised, then captured in OTTR templates. With a library of OTTR templates, we can secure uniformity: as ontologies are built, as they are applied to integration of existing data sources, and in analysis and reporting.
To make the ontology-based approach practical for the industry, a new kind of repository service is needed, one that provides both ontologies and the templates for using them in projects. In our presentation, we will demonstrate how READI builds a platform for such a service, compliant with web best practices including Linked Data, and exploiting the template library facilities of the OTTR reference implementation Lutra.
Demo: Weblutra demonstration
Simple walk-though of WebLutra, the web version of Lutra. By Martin G. Skjæveland.
Tutorials and Demos
Tutorials and demos are kept on seperate pages:
Pattern-based knowledge base construction at ISWC 2020
Abstract
A major barrier for the adoption of semantic web technologies in industry is the construction of sustainable knowledge bases; domain experts and end-users often find semantic web languages and tools difficult to use. Reasonable Ontology Templates (OTTR) is a language and framework that allows abstractions or modelling patterns over RDF/OWL to be succinctly represented and instantiated. It is designed to address the needs and expertise domain experts, ontology engineers, and data managers in the process of creating and maintaining high-quality, maintainable knowledge bases. The tutorial will give an introduction to the OTTR framework, discuss modelling best practices for sustainable knowledge bases using templates and demonstrate practical use templates. The tutorial is relevant for semantic web practitioners and ontology engineers who are eager to make efficient use of modelling patterns in their work, and for information managers from industry looking for possible ways to introduce ontology development into their enterprise.
Scalable construction of sustainable knowledge bases at ISWC 2019
Abstract
A major barrier for the adoption of semantic web technologies in industry is the construction of sustainable knowledge bases; domain experts and end-users often find semantic web languages and tools difficult to use. Reasonable Ontology Templates (OTTR) is a language and framework that allows abstractions or modelling patterns over RDF/OWL to be succinctly represented and instantiated. It is designed to address the needs and expertise domain experts, ontology engineers, and data managers in the process of creating and maintaining high-quality, maintainable knowledge bases. The tutorial is relevant for semantic web practitioners and ontology engineers who are eager to make efficient use of modelling patterns in their work, and for information managers from industry looking for possible ways to introduce ontology development into their enterprise.
Practical and Scalable Pattern-based Ontology Engineering with Reasonable Ontology Templates at ESWC 2019
Abstract
Learn how to build, maintain and interact with knowledge bases via higher level abstractions and modelling patterns using the OTTR templating framework.
-
Abstract
A major bottleneck for the successful adoption of ontology-based information systems in industry is the construction and maintenance of large-scale ontologies. This tutorial will introduce Reasonable Ontology Templates (OTTR), a framework for ontology construction and maintenance based on efficient representation and instantiation of modelling patterns. The participants will learn how such ontology abstraction mechanisms can be beneficial for building, interacting with, and maintaining large-scale ontologies. The tutorial will consist of presentations, plenary and individual exercises using open source tooling. Participants that wish to take part in the individual exercises should bring a laptop with Java 8 installed.
- Online demo for ISWC 2018 demo paper + poster
- Companion text ISWC 2017 poster paper + poster
Talks
- OntoCommons Workshop on Ontology Engineering and Knowledge Graphs tool ecosystem 2022-08-31, Reasonable Ontology Templates, Martin G. Skjæveland.
- 3rd OTTR user forum 2022-05-11, OTTR team + invited talks.
- UiO/SIRIUS general assembly, Ontology Engineering Research Program + Reasonable Ontology Templates, Martin G. Skjæveland.
- 2nd OTTR user forum 2021-06-18, OTTR team + invited talks.
- 1st OTTR user forum 2021-01-28, OTTR team + invited talks.
- Presentation for Strategic Advisory Committee at the Faculty of Mathematics and Natural Sciences UiO 2019-11-28, OTTR Templates, Martin G. Skjæveland.
- OSDU workshop 2019-10-08, OTTR: Scalable construction of sustainable knowledge bases, Martin G. Skjæveland and Dag Hovland.
- UiO/SIRIUS General Assembly 2019-05-23, Ontology engineering for industrial applications using Reasonable Ontology Templates(OTTR), Martin G. Skjæveland.
- CapGemini semantics workshop 2019-04-26, Reasonable Ontology Templates, Martin G. Skjæveland.
- ISWC 2018 research track: Reasonable Ontology Templates, Martin G. Skjæveland.
- ISWC 2018 industry track: Semantic Material Master Data Management at Aibel, Anders Gjerver (Aibel) and Martin G. Skjæveland.
- UiO/SIRIUS Seminar 2018-08-27, Reasonable Ontology Templates, Martin G. Skjæveland, Leif Harald Karlsen and Daniel Lupp.
- UiO/SIRIUS workshop with University of Western Australia 2018-08-15, Reasonable Ontology Templates, Martin G. Skjæveland, Leif Harald Karlsen and Daniel Lupp.
- Bielefeld University visit 2018-06-05, Reasonable Ontology Templates, Martin G. Skjæveland, Leif Harald Karlsen and Daniel Lupp.
- Uni Bremen visit 2018-06-04, Reasonable Ontology Templates, Martin G. Skjæveland and Leif Harald Karlsen.
- SIRIUS' Industrial Ontology Colloquium 2018-04-13: Programming semantics: practical applications of OTTR, Leif Harald Karlsen.
- TU Wien visit 2017-11-30, Reasonable Ontology Templates—When macros are more than just macros, Daniel Lupp.
- Workshop on Ontology Design and Patterns 2017: Reasonable Ontology Templates, Martin G. Skjæveland.
- SIRIUS' Industrial Ontology Colloquium 2017-09-29: Reasonable Ontology Templates, Martin G. Skjæveland.
- SIRIUS' Industrial Ontology Colloquium 2017-03-03: Ontology Templates, Martin G. Skjæveland.
OTTR logos
The OTTR logo is created by SHS. It comes in different variations:
OTTR
Lutra
mOTTR
rOTTR
wOTTR
stOTTR
stOTTR
bOTTR
tabOTTR
tutOTTR
demOTTR
pOTTR
lOTTR
docTTR
emacs-ottr-toolkit
OTTR-log
Alexander Kielland
News archive
- 2023-11-09
- Grundfos' Industrial Ontology Engineering Platform uses OTTR. Read all about it in their ISWC 2023 industry paper: Building an Industrial Ontology Engineering Platform, and in https://medium.com/wallscope/developing-ontology-tools-with-grundfos-d84a961bd4cd.
- 2023-11-07
- Moritz Blum et al. shares Insights from an OTTR-centric Ontology Engineering Methodology at WOP@ISWC2023.
- 2022-08-17
- On 2022-08-31 we are giving a talk on OTTR at OntoCommons Workshop on Ontology Engineering and Knowledge Graphs tool ecosystem. Registration is free and open!
- 2022-08-15
- Our paper on abbreviations for complex OWL expressions has been accepted at KGSum 2022.
- 2022-07-08
- Our paper on syntactic modelling structures in ontologies [1] has been accepted at ISWC 2022.
- 2022-04-04
- Please register for the 3nd OTTR user forum which will take place physically and co-located with the general assembly of SIRIUS.
- 2022-03-16
- We are very happy to see that Veronika Heimsbakk, CapGemini is giving a tutorial on OTTR and a talk on the use of OTTR "Growing Your Graph With OTTR" at The Knowledge Graph Conference (https://www.knowledgegraph.tech/) More information here:
- 2021-05-28
- Join the 2nd OTTR user forum. Registration is free.
- 2021-05-10
- Two new introductional videos about OTTR are published: one video lecture by Leif Harald Karlsen on the basic language constructs of OTTR, and one live coding session by Daniel Lupp on how to incrementally build a small template library using a top-down approach.
- 2020-12-11
- Please join us at the 1st OTTR user forum for the latest news and discussions with OTTR users. Invited talk by Johan W. Klüwer. Registration is free.
- 2020-10-01
- Our paper on the design principles, content and management of the core OTTR template library has been accepted for WOP2020. The paper will be part of the upcoming book: "Advances in Pattern-based Ontology Engineering".
- 2020-09-13
- Our paper "Template Libraries for Industrial Asset Maintenance: A Methodology for Scalable and Maintainable Ontologies" [3] with Melinda Hodkiewicz has been accepted for SSWS 2020.
- 2020-05-20
- Extended versions of our WOP17 and WOP18 papers " Pattern-Based Ontology Design and Instantiation with Reasonable Ontology Templates" [6] and "Making a Case for Formal Relations over Ontology Patterns" [3] will appear as chapters in the forthcoming book "Advances in Pattern-based Ontology Engineering" published by IOS Press.
- 2020-03-04
- We will be giving a tutorial on OTTR templates at ISWC 2020 titled: Pattern-based knowledge base construction.
- 2019-10-24
- The pOTTR OTTR Primer is released! See https://primer.ottr.xyz/
- 2019-02-14
- We will be giving a tutorial on OTTR templates at ISWC 2019 titled: Scalable construction of sustainable knowledge bases.
- 2019-02-01
- Lutra version 0.5.0-alpha-3 is released: https://gitlab.com/ottr/lutra/lutra/releases. Please test and give us feedback.
- 2018-12-03
- We will be giving a tutorial on OTTR templates at ESWC 2019 titled: Practical and Scalable Pattern-based Ontology Engineering with Reasonable Ontology Templates.
- 2018-11-20
- OTTR templates will be presented at the International Industrial Ontologies Workshops in Oslo February 2019: Ontology patterns in practice.
- 2018-10-10
- Our ISWC research paper [4] is nominated for best paper award.
- 2018-06-27
- Our short paper "Making a Case for Formal Relations over Ontology Patterns" [3] is accepted for the Workshop of Ontology Design Patterns (WOP2018)
- 2018-06-18
- Our ISWC demo paper [5] demonstrating the results of our ISWC research paper [4] is accepted.
- 2018-05-28
- Our paper "Practical Ontology Pattern Instantiation, Discovery, and Maintenance with Reasonable Ontology Templates" [4] is accepted for ISWC's research track.
Contact
If you have a question or technical issue with OTTR, please use our gitter forum: https://gitter.im/ottr-talk
Or, use one of these issue trackers:
Iff your inquiry does not suit the format of an issue, you can
email the lead developer of OTTR, Martin G. Skjæveland
[email protected]
.
Appendix
Pronunciation
We pronounce OTTR as "otter", the animal, see, e.g., https://dictionary.cambridge.org/dictionary/english/otter.
Prefixes
These are the prefixes used on this page:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix ottr: <http://ns.ottr.xyz/0.4/> . @prefix ax: <http://tpl.ottr.xyz/owl/axiom/0.1/> . @prefix rstr: <http://tpl.ottr.xyz/owl/restriction/0.1/> . @prefix o-pizza: <http://tpl.ottr.xyz/pizza/0.1/> . @prefix ex: <http://example.com/ns#> .