[Nepomuk] Re: Presentation, queries and other stuff

Sebastian Trüg trueg at kde.org
Mon Feb 28 08:26:07 CET 2011


On 02/23/2011 09:42 PM, Ignacio Serantes wrote:
> Hi
>  
> 
>     thanks a lot for contributing.
> 
> 
> You're welcome and thanks to you and your collaborators for develop a
> very interesting project. 
> 
> 
>     On 02/22/2011 11:16 PM, Ignacio Serantes wrote:
>     > I'm actually developing a python script to backup/restore, share
>     nepomuk
>     > data in usb disks and tag/untag files from command line. The
>     script name
>     > is neposidekick and I submitted to kde-apps.
>     >
>     > But I updated last week to KDE 4.6 and because search is not
>     working, I
>     > dislike a lot the new filter panel, and I hate that the query toolbar
>     > box was removed in KDE 4.6, I decided to add queries to my script.
> 
>     The query box was not removed at all. Simple press Ctrl-F to get it
>     shown again like in other applications.
> 
> 
> Yes but aide system is missing, I filled a bug about this in
> kde-apps.org <http://kde-apps.org>, when I write a new text queries
> don't work at all and dolphin do a file name search and seems like
> logical "and" is totally broken. This behavior is not really useful to
> me :).

kde-apps.org is not really a place to file bugs. They will never get
noticed. Please use bugs.kde.org.
As for the Dolphin search: I am not happy with it either. It will
hopefully be better in 4.7.

> 
>     > Actually queries works only in console fine and fast except if you mix
>     > ontologies, a design mistake because I barely know sparql, but next
>     > weekend I will rewrite sparql builder and solve this problem.
>     >
>     > The search syntax is currently:
>     >
>     > exact_string = "string" | 'string'
>     > value = exact_string | date | number | string
>     > op = > | < | >= | <= | = | !=
>     >
>     > term = [ + | - ] value [op] [:ontology]
>     > query = term [ [or] term ]...
>     >
>     > but dates, numbers and arithmetic operators are not supported and only
>     > Tag, hasTag, description and url ontologies are implemented yet.
>     >
>     > Here are same usage examples:
>     > query: 'pending':hasTag .avi:name -'Takeuchi Yūko':actor
>     > explanation: hasTag equals pending, file name contains .avi and actor
>     > not equal 'Takeuchi Yūko'
>     >
>     > query: wind
>     > explanation: wind contained in all supported places
>     >
>     > query: movie:hasTag 5>
>     > explanation: hasTag contains movie and rating > 5
>     >
>     > query: 5< or 8>
>     > explanation: rating < 5 or rating > 8
>     >
>     > Some question are not decided yet, for example date format, but when I
>     > will rewrite sparql generator I will have more knowledge about
>     this stuff.
> 
>     nice.
> 
>     > About query language, please consider that my intention is not
>     create a
>     > natural language, an easy language or an input interface because this
>     > are nepomuksearch and filter panel goals. I want a syntax where
>     you can
>     > write complex queries in a few seconds, without inutile key
>     presses or a
>     > method where you need to open a window several times and do a
>     search to
>     > add a tag to build your query.
> 
>     I can understand that.
> 
>     > In irc sxe (sorry and don't know his real name) was a great help
>     testing
>     > my work and he and V. Handa suggested to write a KIO. I think that
>     this
>     > is a great idea if KIO could be written in python so any knowledge
>     about
>     > this stuff will be appreciated.
>     >
>     > Comments and suggestions about my work are welcome :).
> 
>     Well, the nepomuksearch:/ KIO slave already supports a more natural
>     language, ie. the language that is used in the search box. It allows to
>     write queries like "hasTag:foobar AND ...".
>     The query parser is one big hack and I would actually like to get it
>     improved (compare the GSOC project idea:
>     http://community.kde.org/GSoC/2011/Ideas#Project:_A_.22real.22_query_parser).
>     So maybe the work could be combined?
> 
> 
> Sure, I want to help :). I like nepomuksearch syntax, I use everyday in
> KDE 4.5 and aide system was terrific. Obviously, I prefer my syntax
> because it's fast (typing of course) but parser and builder
> are separated things so is easy change the parser or even, try to
> support more than one language syntax. This could be really useful in
> other languages because, if your main intention is write a natural
> language parser there is a lot of people that don't understand English.

In theory it already is a bit multi-language. We only need translations
for the ontologies. Sadly every attempt at providing those translations
failed for different reasons.

> About aide system I'm really interested in implement something similar
> so, where I can found this code?. I barely read C/C++ but I will do my best.

What do you mean by "aide system" anyway? Auto-completion?

> Next weekend I will rewrite sparql builder, I learn a few sparql last
> days but I need to write several queries and analyze results to
> be comfortable and, if I have enough time, I will try to write a KIO in
> python. When all this work is finished I'll be open about any work
> combination you have in mind.
> 
> At least I have one thing clear, an alternative search system written in
> python ready to use when official query systems are broken could be a
> great addition.

Why do you generate SPARQL directly instead of using the query API[1]?
That would be much simpler for you and make for better readable code.

Cheers,
Sebastian

[1]
http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/namespaceNepomuk_1_1Query.html

> 
> 
>     > On the other side, I'm reading nmm ontologies and I found that
>     there is
>     > a lot of interesting stuff, at least for me, missing. Things like
>     music
>     > videos or live performances, documentaries or emission dates. I'm a
>     > newbie so I don't know if things like this are inside or outside
>     of nmm
>     > goals neither this stuff was discussed before.
> 
>     These things are in the scope of NMM and IMHO it would be a good idea to
>     add them.
> 
> 
> I think that at least nmm:emissionDate, a simple copy of
> nmm:releaseDate, would be great.
> 
>  
> 
> 
>     Cheers,
>     Sebastian
>     _______________________________________________
>     Nepomuk mailing list
>     Nepomuk at kde.org <mailto:Nepomuk at kde.org>
>     https://mail.kde.org/mailman/listinfo/nepomuk
> 
> 
> 
> 
> -- 
> Cheers,
> Ignacio
> 
> 
> 
> 
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk


More information about the Nepomuk mailing list