Search This Blog

21 October 2008

Antics in Semantics: What exactly is the Semantic Web?

A long time ago, you may remember me talking about Microformats. Just to fill you in on the details, Microformats are little nuggets of code that can slip unobtrusively into any piece of XHTML and inform software of what everything actually means: that one piece of the document is an address whilst another is a resume, or that one piece is an event whilst another is a review. Once the software can see the data on the page in a format it recognises, it can do a number of clever things with it, such as finding an address on Google Maps or adding an event to your calendar program.

That is Microformats in a nutshell, but this post isn't about them. Instead I'm going to be delving into the secrets of the bigger, more versatile, and altogether much stranger web language that is RDF.

RDF stands for Resource Description Framework, which just about sums up its raison d'être: describing resources. Resources aren't just web documents, though; anything can be a resource, regardless of whether or not it exists on the web or even in the real world. To identify a resource, the most common practice is to give it a URI (Uniform Resource Identifier). A URI is similar to a URL, except the former need not lead to an actual web document when typed into your browser. Since an address that doesn't lead anywhere isn't very helpful, it is recommended that any resource URIs you use in your RDF do represent an actual location on the web that can be visited for information on the resource.

So that's what RDF does, but how does it do it? The answer is triples, a concept whereby all information is separated into three-part statements containing a subject, predicate and object. The subject is always a resource, the object can be a resource or a piece of data such as a string, and the predicate is a property - represented by a resource - that links the subject and object together. An example of a triple in the English language would be: "Acme Inc. has John Smith as an employee." Here, 'Acme Inc.' is the subject, 'John Smith' is the object and the ownership of an employee is the predicate. But how do we express this in RDF? Find out in the next exciting instalment, coming out as soon as I've finished writing it!

No comments:

Post a Comment