During this lab we will continue the development of the ontology started in the previous classes.
During the previous lab you did a lot of conceptual work – you thought about the purpose of an ontology, its scope and basic concepts.
Now, we will focus on the more technical aspects, introducing selected constructs of the OWL language.
NOTES:
RiversideBandMusicCD (in Primitive class hierarchy section),BaroqueOrganMusicCD (in Properties and Restrictions section),GuitarMusicCD (in Defined Classes section),ACapellaMusic (in Union in OWL section),ACapellaMixMusicCD (in Universal Restriction and Open World Assumption section).Let's start!
File → Open…File → Preferences → New entities → Entry IRI, e.g. https://your-name/game-of-thrones.Refactor → Change ontology IRI… (it CAN be the prefix, e.g. https://your-name/game-of-thrones)Classes → Class hierarchy tab. RiversideBandMusicCD class (Riverside) as a subclass of BandMusicCD, PolishMusicCD and ProgressiveRockMusicCD (SubClass of button in the class description, and choose appropriate classes from Class hierarchy tab).
Make primitive siblings disjoint in the Edit MenuReasoner menu choose HermiT. Start the reasoner. Once your reasoner is running, periodically classify your ontology by pressing the Synchronize reasoner button in the Reasoner menu. Inferred hierarchy can be seen in “Class hierarchy (inferred)” tab:
Explain inference button (question mark in Description tab; see picture in Defined Classes section below) and repair the ontology.
In order to describe our classes we need properties, which are used to relate members of a class. We then add restrictions on the class to state logically how these properties are used.
At this stage we are creating Primitive Classes, which only have necessary conditions (in this case, restrictions) on them –- these are conditions that must be satisfied by all members of this class.
MusicInstrument) and a set of its subclasses.Artist/MusicCD as a superclass).Object Properties tabcontainsMusic and containsMusicPerformedOnSubClass of (click the circle with + to add new superclass), then choose Object restriction creator tabBaroqueOrganMusicCD class MusicCD: BaroqueOrganMusicCDSubClass of → Object restriction creatorcontainsMusicPerformedOn in the left window and OrganInstrument in the class hierarchy in the right window. Set another restriction saying that BaroqueOrganMusicCD - containsMusic - BaroqueMusicGenre. Eventually you should have a primitive class defined as follows:
JimiHendrixMusicCD as a subclass of the MusicCD, define that it contains music performed on an electric guitar.Creating a Defined Class is similar to creating a primitive class (as in previous step), but a defined class has one or more Necessary & Sufficient Condition. Classes can easily be migrated between primitive and defined.
MusicCD called GuitarMusicCD. In general, defined classes are not disjoint from their siblingsGuitarMusicCD to state that it contains music performed on guitar.Class hierarchy (inferred) to see what has been classified under the new class.
Explain inference button (with question mark) and analyze the inference the reasoner did to classify the subclass relationship. In order to define an ACappellaMusicCD, we are going to model the idea of a music performed without instruments. This class is going to be covered by all of the Music that are not InstrumentalMusic. GregorianChant, JewishCantillation, MuslimAnaseheed, etc. are all to be classified as ACapellaMusic.
Music class and the following subclasses of the Music: GregorianChant, JewishCantillation, MuslimAnaseheed.Music called ACapellaMusicEquivalent to add buttonClass expression editor
To state that members of a class can only have a specific relationship with individuals
from a specific class we use a Universal (AllValuesFrom) restriction. We need to model the fact that:
Any MusicCD that only has music from ACapellaMusic is a ACapellaMusicCD
MusicCD called ACapellaMusicCDConvert selected rows to defined classACapellaMixMusicCD as a subclass of the MusicCD.ACapellaMixMusicCD classified as an ACapellaMusicCD?
Why the ACapellaMixMusicCD wasn't classified as a ACapellaMusicCD, although it has only ACapellaMusic on it?
Because reasoning in OWL-DL is based on the Open World Assumption:
Therefore, we need to close our MusicCD descriptions in order for them to classify correctly.
ACapellaMixMusicCDOnly (universal) restriction along the containsMusic property. The filler will be a union of all of the music kinds on the CD – ie the union should match all of the music kinds of the existing Some (existential) restrictions using the contains property. Select Add SubClass of button, then Class expression editor and type the following:
ACapellaMusicCD.
Data Properties are relations that connect objects and literals.
As a range, you can specify any datatype (most often we use the XSD Datatypes; you have seen them in RDF: Datatypes section of Modeling with RDF and RDFS lab.
Setting a domain on a property may lead to unexpected classifier results if the property is misused (e.g., if the domain has been over-constrained; or we use the property dedicated to other class). We will explore this further in this exercise.
publishedIn data property in the Data Properties tab.published in the ontology.File → Save as → RDF/XMLScanner by RDF