
UPDATE: I added some links to the post and prettied it up a bit.
Introduction: What this post is about
I’ve seen a few comments and blogposts about KDE4 along the lines of:
“You promissed us a semantic desktop – but there isn’t one. KDE4 is just KDE3 made pretty
where is the new semantic interaction with data then ?”
Well in this post, I will try to answer that question. I’ll be talking a lot about other people’s projects, so if I get anything wrong – I hope those people will correct me.
The short version is: it’s coming. KDE4 laid the architectural grounds for it, but it’s not
yet how you visibly interact with it for two main reasons.
The first is simple: applications have to be adapted to start utilising advanced semantic search features for finding data, and that takes time. But this is actually a fairly small factor as about 90% of the adaptation lies in KDELIBS. The big one is the second reason: semantic desktops require lots of metadata, which need to exist first.
The chicken-and-egg problem: Egg-laying
Let’s assume that we had shipped KDE4.0/1 with semantic access as the default in all apps, you would try to find files and constantly not find them -because the metadata doesn’t exist. It has to be added.
This creates a bit of a chicken-and-egg problem, nobody wants to go and spend a month carefully tagging all their old data to be semantically searchable. But if data isn’t tagged, it’s not possible to find it by tags now is it ?
So how do you address this. You start by working behind the scenes, build a desktop that uses traditional file access to get files, but as you create and work with them automagically tag as much as you can. A lot of data can be searched and refferenced by content – in fact almost anything that contain words can be, but music and picture files don’t. Video files don’t. These are the problem right now.
As you use KDE4.1 your data you create is starting to get tagged to some extent automatically. Digikam has powerful image tagging support already and it works easilly enough for manual tagging. But let’s say you save a picture from an e-mail. Kmail should now automatically tag it with the address it was sent from, the date you got it and a few things it already knows. Maybe the e-mail subject ? (I would love to know more about this part – what autotags are automatically created).
Filenames only give you a single refference for data, tags give you the ability to cross refference. Let’s say I open digikam, and select all the pics in an album with my dog in it and tag them “leela”, now I select everything (and it’s easy with thumbnails) that has my wife in them and tag those “silvia”.
This now opens the possibility to later find all pics of my wife with our dog by crosschecking for the Silvia and Leela tags – this is where it gets powerful. By adding more tags, I can start to get ever better results.
The chicken-and-egg-problem: add the chicken
The next phase then, will be to start letting everyhing use these tags. When I am sending a mail and I want to attach a file, the open dialog will let me find files by their tags, rather than the directory/filename – so ultimately I can easilly find the picture which foo@bar mailed me of Silvia playing with Leela on the beach by checking for “silvia”,”leela”,”beach” and “foo@bar”. This is not there yet, because the tag creation part needs to be happening first to allow this to work. Ultimately though, it should become the default way to open files in anything – so that you only ever have to browse for the few things you don’t have searchable.
How it is done:
So how is this being implemented ? There are a few different projects that are working together to make the semantic desktop work. A core one is strigi. Strigi is a desktop search engine. It is powerful with multiple backends. Sadly, quite a few KDE4 distro’s currently disable it ! Or ship it broken (this needs to be considdered an urgent issue as it will be a block to the future of the semantic desktop if it’s not there now). Assuming though that your strigi is working on your desktop, as you start to KDE4, your initial indexing will begin to run (which is slow the first time and uses a lot of resources, this is an unfortunate side-effect). Strigi can index files by image tags, music tags, content and a few other kinds of tags to. So it starts to create a search tool that can ultimately locate any file by every piece of available meta-data.
Strigi will form the heart of how we find things in the future, right now it’s there mostly to start getting the indexing up to speed and it’s not yet integrated well into apps. There is a strigiclient that comes with it though which lets you search through the index already though.
The next level is nepomuk. Nepomuk is not exclusive to KDE though KDE is probably the first desktop to fully utilise it. Nepomuk is a platform independent semantic desktop architecture. It provides an interface between your desktop search engine on one side (in our case strigi) and your desktop on the other. Nepomuk is how apps will find and tag things.
Right now the most visible user of Nepomuk from a user point of view is upcoming amarok2.0 which uses it extensively to find and manage your music files. Amarok has a unique advantage for this purpose as virtually all music files are already well tagged with some essential data – this is usually done when they are created automatically and has been for years. Unlike all other apps, almost all our music data has been solidly tagged for years.
Amarok is using nepomuk to start building things like biassed playlist generation. So you could start to select music from certain era’s by using a bias from a certain year (say not out by more than 4 years in either direction) the further to the limit a song is, the lower it’s bias scoring, the later it gets in the playlist (this is an oversimplification but the amarok blog has a very detailed description of the bias system).
Finally, there is KDELIBS, which is what ties nepomuk to the application level. This is where apps will start to get tag-enabled file dialogs for example, without the apps even having to change. Things like amarok or digikam which work directly with one specific set of data implement semantics in their core interfaces directly. Things like krita or kword which work with one file at a time will use it in other ways, through smart dialogs and automatic tagging and indexing.
Conclusion:
I am well aware that this post does not cover the full detail of the semantic desktop in it’s entirety but that would take a book anyway. More-over it’s not meant to be technical doc, it’s meant to expand on our examples of what a semantic desktop can do with an explanation of how we intend to get to it from the current way KDE4 looks and works and why you don’t really see it yet. I invite comments, especially from developers who can explain parts of the semantic desktop idea in more detail and correct any misunderstandings on my part.
Further reading:
Mandriva demonstrates KDE4 Semantic Desktop
Sebastian TrĂ¼g on the semantic desktop ad Akademy 2008
Aaron Seigo on Nepomuk context
Nepomuk for integration (also from Akademy)
A blog post by Sebastian on the Strigi, Nepomuk and KDE4.2