Semantic Web — The next generation of World Wide Web!

Kabilesh Kumararatnam
Tech-Sauce
Published in
5 min readApr 16, 2019

The next generation of the internet is just around the corner, and it is vastly different to the world wide web of today. Semantic web, or Web 3.0 is the idea that the internet will one day become a personal assistant for each individual, with the ability to learn about an individual and suggest options for them based on the person’s interests.

The Internet before the Web

The internet existed even before the inception of the World Wide Web. The pre-Web Internet was an almost entirely text-based world. Users had to connect to remote systems using terminals, download files containing information and then view the files in their local system. There were ASCII-based end-user programs such as gopher, which allowed to use a menu to search through organized collections of files. You might think of this as a predecessor to Yahoo!, and you wouldn’t be far wrong.

Tim Berners-Lee’s vision of a global hyperlinked information system became a possibility by the second half of the 1980s. He created the World Wide Web (the Web) which is an information space where documents and other web resources are identified by Uniform Resource Locators(URLs), interlinked by hypertext links, and accessible via the Internet. The web used browsers to access the internet. However, The early Web was also pretty much text-based. It wasn’t pretty at all. The innovation that the Web really brought to the Web wasn’t graphics or audio, it was that it made it possible to easily connect files to one another using hyperlinks. Today, everything in the internet is linked together.

The Semantic Web

We can consider the above mentioned as the first and second generations of web. The next generation not only contains hyperlinked information, but also adds more meaning to this information. The Semantic Web is an extension of the World Wide Web through standards by the World Wide Web Consortium(W3C). The standards promote common data formats and exchange protocols on the Web, most fundamentally the Resource Description Framework(RDF). According to the W3C, “The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries”. Therefore the Semantic Web regarded as an integrator across different content, information applications and systems.

The creator of web, Tim Berners Lee was himself the pioneer of semantic web concept also. Berners-Lee originally expressed his vision of the Semantic Web as follows:

“I have a dream for the Web to become capable of analyzing all the data on the Web — the content, links, and transactions between people and computers. A “Semantic Web”, which makes this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The “intelligent agents” people have touted for ages will finally materialize.”

Now, the 21st century is almost two decades old and Berners-Lee’s dream is coming alive.

The Semantic Web is regarded as an integrator across different content, information applications and systems. However, how do we represent knowledge with more meaning in the web? To achieve this the semantic web technology introduces concepts and technologies such as URI, RDF, RDFS, SPARQL query language and Ontologies.

URI (Universal Resource Identifier)

A URI is a simple and extensible schema for worldwide unique identification of abstract or physical resources where a resource can be any object with a clear identity.

RDF (Resource Description Framework)

RDF is a general method for conceptual description or modeling of information that is implemented in web resources. It is based on the idea of making statements about resources in expressions of the form subject–predicate–object, known as triples. A RDF description contains URIs and literals. In an RDF triple URIs are written in angle brackets and literals are written in quotation marks. Each triple ends with a period.

@prefix dbo: <http://dbpedia.org/ontology/>.
@base <http://dbpedia.org/resource/>.
<Pluto> dbo: discovered “1930”.
<Pluto> dbo: discoverer < Clyde_Tombauh>.

RDFS (RDF Schema)

RDFS is an extended version of the RDF. RDF Schema allows Definition of classes via rdfs:Class and Class instantiation in RDF via rdf:type. Further, there are other definitions such as rdf:Property, rdfs:domain, rdfs:range, rdfs:Literal, rdfs:Resource and etc. RDFS also allows definition of hierarchical relationships such as rdfs:subClassOf and rdfs:subPropertyOf.

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.org/> .
@prefix zoo: <http://example.org/zoo/> .
ex:dog1 rdf:type ex:animal .
ex:cat1 rdf:type ex:cat .
ex:cat rdfs:subClassOf ex:animal .
zoo:host rdfs:range ex:animal .
ex:zoo1 zoo:host ex:cat2 .

SPARQL Query Language

SPARQL is an RDF query language which is able to retrieve and manipulate data stored in RDF format. It allows for a query to consist of triple patterns, conjunctions, disjunctions, and optional patterns. It provides a number of advanced functions for constructing advanced query patterns, for stating additional filtering conditions and for formatting the final output. Visit W3C page for more on SPARQL.

The example below demonstrates a simple query that leverages the ontology definition foaf (“friend of a friend”). It returns names and emails of every person in the data-set.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?email
WHERE
{
?person a foaf:Person .
?person foaf:name ?name .
?person foaf:mbox ?email .
}

The following are a few SPARQL endpoints where you can execute SPARQL queries and retrieve information.

The amount of information available in the World Wide Web is unimaginably huge. However if this information is not organized properly, the web will not be understandable to the machines, only human could understand it. Since intelligent machines are to be born in the future, it becomes important to connect the information in the web, give them meaning and build a web of knowledge.

--

--