Hey Wassup!

I came across something amazing known as Semantic Web which is associated with another awesome concept of Linked Data. We’ll try to understand both of these one by one and would feel their awesomeness.

Semantic Web

What’s all the hype about semantic web? We’ll be knowing it in a few minutes. The term ‘Semantic web’ was given by Sir Tim Berners-Lee best known as the inventor of world wide web. He has described the semantic web as a component of “Web 3.0”.

Let’s see what Wikipedia says about it:

The term was coined by Tim Berners-Lee for a web of data (or data web) that can be processed by machines — that is, one in which much of the meaning is machine-readable.

Now to understand this part. In today’s web, most of the data is available in the form of HTML documents. These HTML documents are linked with each other using hyperlinks. Though when we read a document containing any link, we can tell if the link should be dereferenced or not. We can tell the relation of the link with the given document. But machines or computer software-agents can’t. Machines can also read these documents, but other than typically seeking keywords in a page, machines have difficulty extracting any information from these document. Hence, we needed a way such that a machine can process the data available on the web semantically. So that it can understand the meaning behind the information and work in cooperation with people.

Semantic web approaches this idea by publishing these documents in a format specifically designed for data such as Resource Description Framework(RDF), Web Ontology Language(OWL). RDF describes a statement as triple. A triple consist of a subject, predicate and an object. Let’s say a sentence, Mary is parent of Frank. Here Mary can be seen as subject, Frank can be seen as an object and the relation between these two ie Parent can be seen as predicate(relation). It can also be represented in a structure called as Data graph.

Here we have linked two piece of information through a relation and that’s how semantic web relates two pieces of data telling how the data is related. But there is still some problem. Can you point out?

So when we are talking about Mary and Frank, we actually know which Mary or Frank are we talking about as during a conversation, an environment is built and throughout the conversation we take it as a reference. But computers don’t know what’s the reference. Hence we need to specify exactly which Mary is it or which Frank is it. And we do it using Uniform Resource Identifier(URI). It uniquely identifies whatever there is on the web. Therefore, computers identifies each subject or predicate using the URI. Internally, it can be viewed as:

Here every relation is defined and specific. This linking of data through URIs to define semantic meaning is what we call as the Linked Data.

Linked Data

The different pieces of information across the web can be linked to each other by providing a semantic meaning. A data graph may link with another data graph from all over the web and forms the foundation of semantic web. This linking of data is referred to as Linked Data.

When working with Linked Data, we come across two possible questions:-

What’s the best way to represent the Linked Data?

How to link these data together?

We know the answer for 2nd question, you know it, right? Yeah! using relations and URIs. Though if you talk about 1st question, then there can be multiple answers or rather I should say that there is no best way. It’s all about the use case. There are many formats like HTML, JSON, XML CSV, RDFa etc. One of the formats also known as JSON-LD. It stands for JavaScript Object Notation for Linked Data. As JSON is the most often used data format across web. We needed something that could be used just as JSON but as well support the Linked Data. Here comes JSON-LD. Though usage of JSON-LD is a talk for another time.

To summarize, we can say that

Semantic Web is the “new generation” of hyperlinking (Web 3.0, hypermedia) that contain semantic referencing. Linked Data is the data itself that is described by semantic linking. RDF is the “logical” framework for describing the data (metadata). JSON-LD is one of the possible format on which we can define Linked Data.

By Lorenzo

Big companies like Google, Facebook are already utilizing the use of Linked Data. For eg. Google uses Knowledge Graphs and Facebook uses Open Graph Protocol through the use of something popularly known as OG-tags.

Further Reading

Well then, it’s time to say goodbye. Meet you next time.

Till then be curious and keep learning!