Ranking of results in KRunner

Matej Svejda matej.svejda at gmail.com
Wed Mar 5 22:46:43 CET 2008


Hey everyone,

I'm planing to participate in Google's  SoC. My project's main goal
will be to make rating of KRunner-results work.
What I want to achieve is that people will start to use KRunner as
their main launcher, not only for programs but for tasks (such as
"create new document" or "send email to xyz"), searching (such as
"documents that contain the word 'gnome'" or "what happend in 1756")
and possibly other things too.

The problem with this is that to cover a broad spectrum of possible
queries there have to be many different runners. Many different
runners mean many different results. And many different results aren't
usefull if they aren't sorted well. This is why rating is so
important. If KRunner would be really kick-ass at rating results it
would save so many users so much time.

An ideal scenario would be for example: Joe wants to listen to a song
by The White Stripes. So he starts typing "white stripes". After he
has typed "white s" KRunner suggests "Listen to songs by "The White
Stripes"" and he just has to press enter and is happy.

So the big question now is how KRunner guessed that Jow wanted to
listen to songs by The White Stripes...

This is what KRunner did:

First it asked all the runners what they have that matches "white s".
The Bookmark-runner said "I have a bookmark called 'White Stripes: A
great band'", the Strigi-runner said "I have a file about the White
Stripes", the contact-runner said "I have a contact called 'Debra
White Smith'" and finally the Amarok-runner said "Hey, let's listen to
The White Stripes".

After that KRunner asked: "Hey runners: How probable do you think it
is that the user wants to use you?". Then the runners start
calculating. The bookmark runner, the Amarok-runner and the contact
runner checked how long their strings the queries are matched to are
on average and how the current number of chars matched compared to
that (or something else). The Strigi-runner counted how often "white
s" appeared in that file. Then the contact-runner and the
Strigi-runner each said: "Well, we think the chance that Joe wants to
use us is 72%" and Amarok said "For me it's 51%".

Then KRunner looked at the freedesktop-conform local
query-match-database that had been synchronized with the central
server just two hours before and looked what KRunner-users from around
the world were thinking of when they entered "white s". It turned out
that the most popular query that contained "white s" was "white
stripes" and that 92% of those users wanted to listen to music by the
White Stripes. This outweighed the self-assessments of all the other
runners and so KRunner said "I think Joe wants to listen to the White
Stripes!".

An alternative for the last part: Joe allready had searched for "white
stripes" into KRunner 3 weeks ago and back then he wanted to listen to
music too. This outweighed the self-assessments too.

I know this would be really hard to implement but I also think that if
KRunner's ranking was the best any search/launch-application has it
could be one of those "Hey look how well KDE handles this
task"-features.

What do you guys think abut this?

Matej


More information about the Panel-devel mailing list