Primer on Semantic Web Ontologies

published: 2017-08-18 17:51:39, updated: 2017-08-18 19:25:32
ontologiesOWLRDFRDFSsemantic web;
A short description for RDF,RDFS, and OWL and their serialisation formats

Introduction

The basic ontology for recording anything (and everything) is RDF, which is just a way of expressing knowledge in the form of triples or (subject, object, predicate) form. RDFS and OWL which build a relationship-constraint model on top of RDF. To summarise, RDF allows expressing knowledge, pure and simple; RDFS and OWL add additional relationships such as hierarchy, inheritance, and restrictions (or in the case of OWL, axioms) that enrich the knowledge through the use of 'structure'. This is not a guide to learn about semantic web ontologies, but if you're looking for that sort of a resource, you may as well start with a StackOverflow answer and then move on to Wikipedia - OWL.

Usage

RDF is used to represent knowledge, but not its validity or truth. So, statements like <harsh> <is> <awesome> are perfectly valid RDF, but there is no way to check their 'validity' or 'correctness'. To express some constraints over the use of resources, one uses RDFS and OWL to structure how the knowledge may be represented. The ontologies also additionally allow inheritance and axioms, which can help create new knowledge through inference and reasoning. For example,

<class:Man> <rdf:type> <subclass:Human>
<class:Woman> <rdf:type> <subclass:Human>
<property:isMother>
    <rdf:type> <owl:Property>
    <rdf:domain> <class:Woman>
    <rdf:range> <class:Human>
<property:isSon>
    <rdf:type> <owl:Property>
    <rdf:domain> <class:Man>
    <rdf:range> <class:Human>

<node:Harsh> <rdf:type> <class:Man>
    <property:isSon> <node:HarshMom>
<node:HarshMom> <property:isMother> <node:Harsh>

defines classes Man and Woman as subclasses of Human, with the properties isMother and isSon with domains and ranges. It then defines that Harsh is a Man, and is the son of HarshMom. At this point, the only inference possible is that HarshMom is of type Human. The next sentence specifies that HarshMom is the mother of Harsh, and therefore, it is possible to infer that HarshMom is a Woman. Although this is a simple example, it amply shows how the structuring of knowledge can be shaped using relationships. Simpler constraints help represent complex knowledge.

Formats

RDFS and OWL are serialised down into RDF, so they are essentially represented as RDF in most cases. There are possibilities of having OWL only formats, which do not cater to RDF, but OWL, as an ontology is based on RDF.