The Web Ontology Language (OWL) is a component of the Semantic Web used to author ontologies. In simple terms, OWL ontologies are "smart" vocabularies for RDF data. They enable reasoning over the data through a set of explicitly defined rules such as concept hierarchies, disjointness relations, and other types of logical statements.
OWL ontologies are formal knowledge models grounded in strict mathematical logic. Their formal semantics is based on a description logic, which gives them the ability to enrich RDF datasets in a consistent, deterministic, and decidable way.
Formally, OWL ontologies are made up of three types of building blocks described below.
Firstly, entities or terms encompass classes, properties, and individuals that make up an ontology and can be thought of as OWL's basic primitives. Examples of entities include
ex:TaylorSwift which can be interpreted as a class, property, and individual, respectively.
Secondly, expressions are used to construct various notions and, for example, define classes. In particular, a class expression defines a class by "selecting" individuals that satisfy certain rules.
Finally, axioms or assertions are statements about entities that are asserted to be true. An example of an axiom is the statement asserting that the class
ex:SportsEvent is a subclass of the class
Below are some examples of OWL axioms and statements that can be derived by means of semantic reasoning.
A statement of the form
ex:C1 rdfs:subClassOf ex:C2 .
asserts that all the instances of
ex:C1 are instances of
ex:rdfs:subClassOf property is transitive, which means that if
ex:C1 is a subclass of
ex:C2 is a subclass of
ex:C1 is also a subclass of (contained in)
For example, based on the following ontology:
# Electric sports car is a subclass of Sports car ex:ElectricSportsCar rdfs:subClassOf ex:SportsCar . # Sports car is a subclass of Car ex:SportsCar rdfs:subClassOf ex:Car .
ex:ElectricSportsCar can be inferred to be a subclass of
ex:Car, i.e. that all electric sports cars are cars.
In OWL, a property is defined as being transitive when it is an instance of the the built-in OWL class
owl:TransitiveProperty. Prototypical examples of such properties include "instance of", "located in", "occurred during", and other types of "part of" relations. As an example, the following excerpt
ex:locatedIn a owl:TransitiveProperty . # Auckland is located in New Zealand ex:Auckland ex:locatedIn ex:NewZealand . # New Zealand is located in Oceania ex:NewZealand ex:locatedIn ex:Oceania .
implicitly states that Auckland is located in Oceania.
A statement of the form
ex:C1 owl:disjointWith ex:C2 .
ex:C2 have no subclasses or individuals in common. Imposing disjointness constraints is useful for ensuring the consistency of datasets and ontologies themselves, and they can be used to derive multiple conclusions. For example, given the following excerpt:
# Fruit and Vegetable are disjoint classes ex:Fruit owl:disjointWith ex:Vegetable . # Apple is a Fruit ex:Apple a ex:Fruit .
an OWL reasoner should be able to derive that apples are not vegetables.
Statements such as
ex:A owl:sameAs ex:B .
indicate that two entities refer to the same exact thing. The linked entities can themselves represent classes, properties, or individuals.
For example, the statement
ex:NewZealand owl:sameAs ex:Aotearoa .
ex:Aotearoa actually have the same "identity" and can be treated as the aliases of the same entity. This means that any statements made about New Zealand can be combined with those about Aotearoa.
OWL ontologies are used to represent knowledge using explicit computable semantics. Overall, they help improve the quality of data, detect inconsistencies, and discover new relationships. By automatically analysing the data, they facilitate various knowledge management tasks and are a powerful tool in the hands of a knowledge engineer.