What is the Semantic Web?

The Semantic Web covers a set of concepts and standards whose goal is to provide a common framework for publishing data and knowledge on the web or on intranets. The aim is to provide data that are easy to reuse, connected, and suitable for logical reasoning.

The Semantic Web rests on two main rules:

  • each resource described is uniquely identified by a URI. From this URI, the resource is accessible to machines or humans through the HTTP protocol,
  • the resource is described with a series of triples following the RDF standard.

A resource can be anything you want to say something about: a person, an object, a place, an organisation, an event…

The properties that link two resources are always named, which makes the relations understandable: “is the creator of”, “is part of”, “takes part in”, “is located in”. The word “semantic” in Semantic Web expresses the fact that all relations are named, so the graph is immediately explicit to whoever explores it, using business terminology.

In addition to the URI and HTTP standards, the Semantic Web standards are:

  • RDF, which standardises the way resources are described as triples,
  • SPARQL, which is used to query a graph and update it,
  • OWL, to model a knowledge graph,
  • SHACL, to describe rules that apply to graphs.

RDF Resource Description Framework

Below are a few short sentences, each giving a piece of information about Beyoncé or one of her songs:

  • Beyoncé was born on 4 September 1981.
  • Beyoncé was born in Houston.
  • Beyoncé is an R&B singer.
  • “Dangerously in Love” is performed by Beyoncé.
  • “Dangerously in Love” was released on 17 June 2003.

RDF makes it possible to formalise this kind of statement as a set of triples.

An RDF triple is an association (subject, predicate, object):

  • the “subject” is the resource being described;
  • the “predicate” is a type of property that applies to this resource;
  • the “object” is a value or another resource: it is the value of the property.

Accumulating these statements as triples forms a knowledge graph.

SPARQL Protocol and RDF Query Language

The purpose of SPARQL is to explore a graph by stating conditions that the resources sought must meet. To find Belgian R&B singers born in the 1980s, the query describes the following constraints:

  • the person composes musical works.
  • the person is classified as an R&B musician.
  • the person was born after 1980.
  • the person was born before 1990.
  • the person was born in a city.
  • the city is located in Belgium.

Among other results, you will find: Selah Sue.

OWL Web Ontology Language

The OWL language is used to describe data models for publishing knowledge in a graph, namely:

  • the classes of objects used in the graph: person, musical work, recording, performance…
  • the properties used to describe resources: “was born on”, “was born in”, “has musical genre”, “plays such an instrument”…
  • the fact that a class is a subclass of another: the class “musical work” is a subclass of the class “work”,
  • the fact that if a resource has a property of a given type, it can be inferred to belong to a given class. For example, if a person plays a musical instrument, we infer that they belong to the class “musician”,
  • the fact that the value of a property must belong to a class: for example, the value of the property “plays an instrument” must belong to the class “musical instrument”.

SHACL Shapes Constraint Language

The SHACL language is used to validate RDF graphs against a set of conditions. For example, the following business rules can be expressed:

  • a performed work has at least one performer,
  • a concert has a single date,
  • the performance date of a work must be later than its composition date,
  • the composition date of the work must be later than the composer’s date of birth.

Checking a graph against SHACL rules produces a report showing which rules are not met in the graph. This is particularly useful for graphs populated from multiple, heterogeneous sources: databases, users, knowledge extracted from texts or images…