Ontologies with Style(s)

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

About Ontologies with Style(s)

Ontologies with Style(s) - or OwS for short - is a language for defining structured vocabularies - from simple value sets up to complex ontologies. The editor for writing OwS programs is MS Word. OwS progams are executed by an interpreter that is implemented as a MS Word makro.

While OwS commands are embedded into any MS Word document, the specification of a vocabulary is also the documentation of the vocabulary. For making OwS look like "normal" MS Word texts, OwS commands can be linked to style sheets. The OwS interpreter implicitly executes the commands assigned to a style sheet whenever it discovers a line of text within a document that if formatted using this style sheet. By this you can e.g. advise the interpreter to consider headline hierarchies as hierarchies of concepts.

A First Example
This example gives an impression how a typical OwS code system definition looks like.
FHIR, CTS2, CTS2-LE and OwS
Learn how OwS fully builds upon standards and works together with the CTS2-LE terminology server.
Installation and Setup
OwS runs from within your MS Word. Make sure you have all required libraries properly installed.

OwS Core Concepts

OwS is two interpreter languages in one. Under the hood there is a powerful but simple OwS Object Language (OOL) that allows to define arbitrary complex ontologies using a small set of OwS statements. You may write OwS programs in this language but mostly you will instead rather write some small macros in the OwS Macro Language (OML). Such macros define how common means of MS Word like style sheets and heading levels map onto the OwS Object Language. E.g. with a one-line-macro you can define that a level-2-headline shall define a codesystem object in the OwS Object Language with the name and URI of the codesystem povided in the headline text.

Directives vs. Statements
Learn more about the two languages that make up OwS and how they are interlaced to simplify the definition of ontologies.
OwS Objects
Learn more about objects and properties and OwS features for customizing these to your demands.

OwS Tutorial

Defining a Terminology: From OOL to OML
This initial course shows how to define a simple terminology. Starting with plain OOL, step-by-step additional OML means are applied in order to make the terminology definition look like a ordinary MS Word document.
Lessons: Defining a Terminology, Setting Properties (Part 1), Using Heading Styles, Using Defaults (Part 1), Binding Properties to Styles, Defining Custom Types
Linking Concepts: From Value Sets to Ontologies
The second course shows how concepts from external code systems (e.g. ICD-10 or SNOMED CT) can be used in OwS. Starting with the setup of a value set based on existing concepts this section closes with the definition of an ontology that includes manifold links among concepts from different code systems.
Lessons: Using an External Code System, OwS Global Objects, Defining a Value Set, Linking Concepts, Using Defaults (Part 2), Setting Properties (Part 2)
Hiding it All: From Patterns to Programing
The third course shows how you can use OwS features to fully hide away OwS behind commom MS Word elements. Starting with further text replacement directives, this section stepwise goes into programing your own macros for processing MS Word styles.
Lessons: Using Patterns (Part 1), The Power of Obligations (Part 1), Defining your own Macro, Setting Properties (Part 3), Generating a Code Hierarchy

OwS Language Reference

This section provides links to the full OwS language reference that gives full definition for all OwS statements, directives, types and objects.

OOL Syntax Overview
This overview shows the complete OwS language syntax on a single page.
OwS Object Language (OOL)
OOL Language Reference: Base Types ;define statement, set statement, default statement, ----> statement, linksystem statement
OOL Object Types: Domain, Codesystem, System, Concept, Predicate, Property, string, collection, Object, Type
OOL System Objects: CTS2LE, OwS, FHIR
OwS Macro Language (OML)
OML Style Sheet Directives: OwS.StyleName, #heading directive, #obligation directive, #pattern directive, #table directive , #stylemapping directive
OML Tokenizer Directives: #goto ... #return, #package ... #endpackage

OwS Plug-Ins

OwS plug-ins are Word VBA classes that can be linked with the OwS compiler at runtime for processing user-defined input formats and OwS language extensions.

Writing your own PwS Plug-In
Available Plug-Ins
  • puml2ows: Import PlantUML classes as OwS type definitions
  • puml2openAPI: Import PlantUML classes for rendering API specifications


OwS Versions and Fixes

OwS Change Log
The change log records all bug fixes and added features to the OwS interpreter