semantic web

The semantic web is an extension of the Web, that aims that web pages embed a machine-readable knowledge representation of their content.


Accessing the semantic web on the web

Content Negotiation

When IRI are published on the web, they are supposed to have a description that comes with them, accessible in different formats using Accept: HTTP header. Well introduced in this article, the specifications urge to use the status code 303 See Also for redirecting to the queried resource description in the correct format. For further reading, Ruben Veborgh had written an article on the topic.

For wikidata, you can use the following command to get a entity in RDF/XML serialization:

curl -I -H "Accept: application/rdf+xml"

and you will be redirected to this url : You can use the mime type plain/text to get a Ntriple serialization.

In practice on NGINX, it can be implemented following this article.

Linked data

Multiple applications use

How to we allow several applications to query/modify the same data.

In this blog article Shaping Linked Data apps, Ruben Verborgh proposes to define "shape" over linked data using SHACL.

Build the web on top of the semantic web

The question is the following: how to build a web on top of graphs of data belonging to the semantic web.

SPARQL answers data model and schema

An issue with SPARQL in the web is the choice of data model for the answers. SPARQL queries can return two kind of data either tuples of value by using SELECT or graph by using CONSTRUCT. Tuples answers doesn't explain the relations between the values they contain. In that sense, tuples are not self-described structure for the answers as JSON documents are in most Web API answer. Since JSON is the most used data model on the web, it can be tempting to represent CONSTRUCT answers using it, but it is not capable to represent graph data; only tree data. Ones again, SPARQL seems to expressive.

The first idea, that comes to my mind here is to either use the JSON query result format for SPARQL endpoint or use JSON-LD 1.1 as output of CONSTRUCT query.

This post accepts webmentions. Do you have the URL to your post?

Otherwise, send your comment on my service.

Or interact from the fediverse with your username:

fediverse logo Share on the Fediverse