Experimenting NL-style…

August 1st, 2010 by mhr3
For the past few days I was (besides watching GUADEC talks) experimenting a little with Zeitgeist and natural language processing... or sort of anyway. Having no real prior knowledge in NL field and not using any of the existing NLP libraries (as I couldn't find anything in C), definitely made it interesting, but also made me realize that NLP is really hard (even though I only wanted to get a very specific app to work) and taking this path most likely isn't a way to get somewhere.

But anyway, the original idea was to make an algorithm which would take a natural language query and "compile" a Zeitgeist event template from it. This would make it possible to basically ask questions about stuff you did on your computer (not necessarily in a question-form) and get results back from Zeitgeist. The way I did the algorithm was very easily pluggable into any ZG application, so of course I tried it with our lovely Sezen search applet, and on the following screenshots you can see it in action:


If you for some reason don't see the images, there are queries like "music played today", "web pages accessed on wednesday" and "files modified 1 week ago". Those are basically types of strings that my simple engine is able to process right now (besides simple queries like "movies", "vector images", etc.)

I won't deny that all this work got inspired by seeing screenshots for the "Storage" project which Siegfried dug out from somewhere. And even though it seems to be long abandoned and dead, I'd still love to see its sources, but unfortunately I couldn't find them anywhere... But if you know about an URL where it still lives, please give me a shout. ;)

Also, if nothing else, this work led to a patch for Vala which fixes up bindings for N-ary trees, so soon one will be able to finally use the N-ary trees' datatypes present in glib, without having to reimplement it in Vala.

More on Sezen panel applet

July 18th, 2010 by mhr3
There has been quite some work on both Sezen and the panel applet since my last post, and here's what's new on that front:

We went through quite a few design iterations of the applet, here is the evolution:
At first, we had the main Sezen widget which was stuffed in a menu, but as I mentioned in my previous post, I found this sub-optimal, as navigating in menu is not the same as doing so in a standalone window, and therefore I wanted the browser-like menu, which came to life in the third iteration, but the problem with it was that even though we had thumbnails (though not in the image), they were totally unhelpful, as they were too small. So the fourth iteration introduced three rows of text per each item, which allowed a big thumbnail on the right, but then some items had only one icon on the left, some had one on left and one on the right, and this just felt weird, so I tried to remove the icons from the left and have all of them on the right, but as you can see in the fifth image, this also doesn't look right, so the idea of thumbnails on the right was abandonded, and we ended up with medium-sized thumbnails on the left as you can see in the last image.

There are still a few loose ends in the applet (clicking on the scroll bar doesn't work most of the time, since scrollbar was never meant to be inside menu, and therefore isn't trivial to fix), and it could also use a global hotkey to popup the search. But even now I find it very usable if one has enough stuff logged by Zeitgeist.

Since Seif still thought that standard Sezen window is the way to go (with which I obviously don't agree), there's also another version of the applet, which just opens undecorated Sezen under the menu item position:
And yea, I agree that it looks nice (especially with elementary theme), but is practically unusable only with keyboard, which I find a deal breaker (also it doesn't close if you click some other window... though this could be implemented, standard menu does it automatically).

Now I wonder about the future of the applet, should we try to fix the issues it has and push it upstream, or turn it into a widget which any app can use (it'd just tell us which mimetypes it's interested in and it would augment the "Open file" function). Also which version is really better? (but please judge by using them, not by looking at the screenshots)

Links to get the code:
https://code.launchpad.net/~elementaryart/gnome-applets/sezen
https://code.launchpad.net/~elementaryart/gnome-applets/sezen2

To install you need to get the branch, its dependencies and run:
./autogen --prefix=/usr && cd sezen && make && sudo make install
Of course you should substitute the "sudo make install" with your distro's equivalent.

PS. For those interested here's my GSoC report for this week: http://mail.gnome.org/archives/gnome-soc-list/2010-July/msg00050.html

Sezen in your panel aka GSoC report #6

July 3rd, 2010 by mhr3
As the reports themselves are quite boring for many people, I'll try to post on the blog more interesting stuff, so it will no longer be a direct copy of the message sent to gnome-soc-list. So let's give it a try...

People who read my reports know that lately I've been working on Sezen (if you haven't heard about this awesome piece of software using Zeitgeist go see a couple of videos at Seif's blog), where both Seif's python version and mine Vala version is receiving lots of love - Seif started to use Mikkel's FTS extension for the search, I didn't do this yet (as the FTS extension might not be installed), but I improved the search we had and now it's no longer that stupid (ie doesn't treat everything as exact phrase search, instead supports "quoted phrase search").


But as you could notice from the title of this post, we went further and tried to integrate sezen into gnome-panel via an applet, and this is how far I got:

At first Seif wanted to show the full sezen window also in the panel applet, but I wanted to try more "panely" look and feel and therefore went this way. Not to mention the challenge it was to get the Entry and the scrollable IconView widgets to work inside a menu (thank you Gtk for this unforgettable experience, you won a few battles, but I gotcha anyway).
If you're thinking now that it doesn't look as blingy as standalone Sezen I have to agree, but I still think that it has more integrated look with the rest of the panel and is already quite usable. I've been thinking where we could take this and I keep looking at this:

Wouldn't it be cool to have this kind of widget on your panel allowing you to start working with anything ZG knows about? What do you think?

For those who are interested, you can also read my official GSoC report #6.

GSoC: Zeitgeist weekly report #5

June 27th, 2010 by mhr3
Hey there!

Another report here with a look-back at what I did this week and what is planned for the next week, so here we go:
  • I started to write a Totem plugin which allows searching for recent media logged in Zeitgeist, so far it's very similar to the Youtube plugin (probably because I borrowed the UI from there), but it indeed does search Zeitgeist. There were a few pecularities with the plugin, so I'll rant here a bit about the documentation - if TotemVideoList requires a reference to TotemObject, it'd be nice to mention this in the documentation - it's far from obvious that one needs to call g_object_set (video_list, "totem", totem_obj, NULL) for it to not crash when one clicks on an item in the widget. Then there were some other crashes when I didn't set "tooltip-column" property, but ok, that one wasn't that hard to figure out.
    The plugin was pushed to zeitgeist-dataproviders[1], but as Seif said, it's not a dataprovider, so he removed it from there, and so far I do not know where we'll push these non-logging plugins. Anyway it's there but you have to revert to revision 78.
  • I helped Seif with Sezen, cause I got quite different data and it was loading very slowly for me - so I tried to use everywhere async gio calls, and after some tweaking it was working much better. Btw. Siegfried just pushed Sezen to Zeitgeist PPA [2], so feel free to check it out.
  • I was still quite unhappy with the responsiveness of Sezen, so I ported it to Vala [3], but to my surprise the thumbnail fetching in the Vala version is *much* slower than in the python version and I don't really know why. In both python and Vala, I'm trying to load all the thumbnails at once, and while in python this works fine, I was getting "too many open files" error in Vala, so I introduced an async method which limits how many thumbnails can be being fetched at one time (while the others are waiting) and that seems to work quite well, but I still have a feeling that the python version is faster.
For next week the plan is to implement also "related media" into the new Totem plugin, take a look on the vim logger, which I noticed is sitting on LP without being "official" part of zeitgeist-dataproviders. And talk to Seif what to do about Sezen / Sezen-vala.

[1] https://code.launchpad.net/~zeitgeist-dataproviders/zeitgeist-dataproviders/trunk
[2] https://launchpad.net/~zeitgeist/+archive/ppa
[3] https://code.launchpad.net/~mhr3/sezen/sezen-vala

GSoC: Zeitgeist weekly report #4

June 19th, 2010 by mhr3
Hey everyone, this week the report will be very short, cause as I mentioned in last week's report I was (and still am) travelling, and in the little spare time I had, the internet connection was very flaky, so unfortunatelly I wasn't able to do much.

I updated the existing plugins to work with libzg 0.2 (as there were some API breaks) and I started to write a totem plugin which will show media grabbed from Zeitgeist, but in the process I encountered a very strange bug in (by that time latest) libzeitgeist, where the timestamps were truncated to 32 bits even though everything was correctly declared as gint64. This of course caused that no results were fetched from Zeitgeist - as the timestamp limited the results till the end of 1970s, and of course I don't have any such events in my DB. Anyway I wrote Mikkel about this bug with a gdb trace and he was able to hunt it down and fix it (fixed in libzg 0.2.1).

For next week I plan to finish the totem plugin and as planned for this week, I'll stop by in #rhythmbox and try to polish and fix the strange bugs in our new Rhythmbox plugin.

GSoC: Zeitgeist weekly report #3

June 10th, 2010 by mhr3
Hello,

I'll be also a bit early this week, as I'll be traveling starting tomorrow, so here we go:

This week I finished moving the build system in zeitgeist-dataproviders[1] to autotools, and even though it's not perfect yet (can't install properly firefox and chrome extensions, mostly because I don't know where to put them in the filesystem for it to just work), it's good enough to build all dataproviders. Also if anyone wants to make a package of the dataproviders, please contact me, I think it's time to do it.

Further I had planned to write a totem extension, which would add some Zeitgeist goodness into it, but in the end this was postponed and instead I wrote a Rhythmbox plugin that adds a few smart playlists to Rhythmbox. This effort was slightly hindered by incomplete Rhythmbox bindings for Vala, but I decided to fix this and auto-generated the Vala bindings for pretty much the entire Rhythmbox, which really wasn't as easy as I expected, but it's now available on bugzilla[2].
Unfortunately I'm seeing some issues with the plugin - for example first time it's loaded it doesn't show anything, even though I am getting the data from Zeitgeist and calling RB's method to add them. I'll have to ask someone who knows the internals of RB why is that...



Also today Mikkel pushed some changes to libzeitgeist[3], so while looking at it, I discovered a little patch which was forgotten in my tree, and besides that I was trying to push some Vala goodness for the new API (foreach support), but I wasn't successful at convincing Mikkel that he needs to change the API a bit... yet :)

So that's about it, for the next week I don't plan much, as I'll be still traveling, but I hope to find some time to polish the new RB plugin, and if I find more time I'll take a stab at the Totem plugin.

Cheers.

[1] https://code.launchpad.net/zeitgeist-dataproviders
[2] https://bugzilla.gnome.org/show_bug.cgi?id=621246
[3] https://code.launchpad.net/libzeitgeist

Awn + Zeitgeist = enhance your workflow

May 6th, 2010 by mhr3
People say that image is worth thousand words, so take a look at this video instead of me saying all those words:



Under the hood there's Awn's window to desktop file matching backed by wncksync (if available). And of course Zeitgeist with a couple of extensions which I'm currently working on.

Before anyone asks, this isn't yet pushed anywhere is now available in a separate awn-extras branch (https://code.launchpad.net/~mhr3/awn-extras/zeitgeist-applet), and will be merged to awn-extras trunk once there's an official release of libzeitgeist and everyone (read awn-testing PPA users) will be able to play with it.

Accepted to GSoC!

April 27th, 2010 by mhr3
I was looking at interesting projects where I could participate in Google Summer of Code, and the project that caught my attention was libzeitgeist - a C-based library (with Vala bindings!) wrapping the quite complex DBus interface of Zeitgeist, so I wrote a proposal and even though there were some complications and modifications, it was accepted!
Therefore this summer I'll be spending lots of time making sure that the apps that you regularly use in GNOME will have plugins which talk to Zeitgeist, so it can gather as much context of your activities as possible.

Thanks to Mikkel and Seif for loads of help already, but be aware guys that it was just the beginning :D