Folksonomies, ontologies and atom

Where I start off with a quick overview of tagging and folksonomies, show how these blend in beautifully with atom feeds, ontologies and the semantic web.

Tagging content is an incredibly simple but useful way to generate metadata, which in aggregation leads to what has been called a Folksonomy. By aggregating all the little individual metadata contributions, one can end up creating a very effective way to find content on the web. I have for example found it very useful for finding quality web pages on the Austrian philosopher Wittgenstein.

How does it work? Let us take the best known example of a tagging service: the bookmarking service. Whenever I find an interesting web page I add it to my, add a couple of tags that occur to me as being good way to identify the content so that I can find it at a later date. This allows me to find bookmarks when I am away from my computer, to share my bookmarks with others, and as a simple backup mechanism.
The task of adding a bookmark is dead simple, as simple as adding it to my browser's bookmarks page. I click a button on my browser, and the page I am looking up opens on a delicious form, where I am presented with a number of tags other users have found helpful for identifying the content, as well as a list of my own tags. This feedback mechanism helps generate agreement on a number of widely used tags, making the service thereby more useful. Here are my wittgenstein bookmarks. The combination of my work and the work thousands of other people, each working in their own interest, makes for a very useful collaboratively generated Wittgenstein page. All at no extra cost to me. The value of the sum is much greater than the value of the parts. Pure economics in action. No wonder the service is so successful.

This is such a good idea, that it has made some people loose all reason. Suddenly the only way of doing everything had to be via tagging, and everything else was to be dumped as a bad dream. I want to show here how in fact tagging and folksonomies can play very nicely with the Semantic Web.

The atom feed format specification (rfc2487) defines a category construct which can appear in an entry. Here is an extract of our very own Tim Bray's feed:

<entry xml:base='When/200x/2006/10/29/'> 
  <title>Lost Souls, Documented</title> 
  <link href='Documented' /> 
  <link rel='replies'        
        href='Documented#comments' /> 
  <category scheme='' 
            term='The World/Places/Vancouver' /> 
  <category scheme='' 
            term='The World' /> 
  <category scheme='' 
            term='Places' /> 
  <category scheme='' 
            term='Vancouver' /> 
  <category scheme='' 
            term='Arts/Photos' /> 
  <category scheme='' 
            term='Arts' /> 
  <category scheme='' 
            term='Photos' />
  <summary type='xhtml'><div xmlns=''>On Saturday night I marched in the  
  <a href=''>Parade of the Lost Souls</a>.
    It was a thrilling evening; I came home exhausted, sore, and happy.  
    It was also extremely well-documented. <i>[Update: 
    <a href=''>Another write-up</a>.]

What are Categories? Nothing more than tags really, with the possibility of namespaceing them (the scheme attribute is optional). Translated into a graphical form my earlier Wittgenstein tag would look like this:

It is usually really helpful to place a document at the resource identified by C by concatenating the scheme and the term to form a url. It this case we can for example find all my wittgenstein resources at the url Tim Bray certainly does this himself. You can find all Tim Bray's entries tagged "Arts/Photos" at We can therefore see the graph as saying

There is no problem describing either of these in one of the rdf formats therefore. Using the N3 notation, I can just write the above graph as

@prefix : <> .

<> a :Category;
           :term "wittgenstein";
           :label "Famous Austrian Philosopher";
           :scheme <> .
The @prefix points out that I am using the AtomOwl Ontology, to describe a category. I can then use this category to tag my entries, or anything else for that matter.

Now one nice thing about showing how this maps to RDF is that we get a nice free out of the box query language with it: SPARQL. If you SPARQL enable your service (as I have recently done with the Roller Blog Server), you can ask queries such as the following, and even try them out on the demo Roller Sparql endpoint:

  • Find all Categories:
    PREFIX awol:  <>
       ?cat  a awol:Category;
             awol:term ?t  .
  • Find all Categories that have a particular term in common:
    PREFIX awol:  <>
      ?c awol:term "sparql"  .
  • Find all entries that are tagged with a category that has the term "sparql":
      ?e a awol:Entry;
         awol:title ?t;
         awol:category [ awol:term "sparql" ]  .
  • Find all tags that start with the letter "s":
          []   awol:term ?t  .
          FILTER regex(?t,"\^s","i")

This shows both how useful folksonomies are, how they fit together with atom, how they work beautifully with the Semantic Web, to allow us to develop powerfull and standard queries, with which some clever developers will certainly know how to create interesting new services.


This article has generated a lengthy thread on the atom protocol, syntax , and ontology web sites.

You can follow the ongoing conversation on the AtomOwl google groups forum.

I'll try to post a summary at the appropriate time.

Posted by Henry Story on November 02, 2006 at 04:33 AM CET #

funny thing - in my introductory lecture about our work and how it is related to the semantic web, i actually use a search about wittgenstein and why current web search techniques produce inaccurate results :)

talking about illustrating the usage of our rules+semweb implementation, i also use their nice URL-interface to process RDF data. there are many more meaningful examples one could come up with this method...

Posted by roman on November 07, 2006 at 12:39 PM CET #

I just found a long and in depth article by Tom Gruber Ontology of Folksonomy: A Mash-up of Apples and Oranges. Very much worth reading if you need to go into more details on the subject.

Posted by Henry Story on November 13, 2006 at 04:35 PM CET #

And there is a very interesting tag ontology that was developed for this by Tom Gruber, which is very close to what I came up with in the post above - though he beat me to it by a year or more :-)

Posted by Henry Story on December 01, 2006 at 10:20 PM CET #

Another similar approach can be seen on it uses an underlying Topic Map for supporting the semantic web. The tag ontology is an evolving organic ontology created and maintained by users. Users can even create relations between tags.

Posted by Roy Lachica on March 28, 2007 at 02:09 PM CEST #

Post a Comment:
Comments are closed for this entry.



« August 2016