Re: [Tracker] tracker and the semantic desktop [was: tracker 1.2.4]



On 07/11/14 10:52, mlo wrote:
Am 06.11.2014 um 23:43 schrieb John Bestevaar:
this morning I invested some of my rare spare time to look into
tracker-sparql.

I constructed this query to get an overview of tags tracker had
automatically assigned.

tracker-sparql -q '
            SELECT ?tag ?file WHERE {
              ?f nao:hasTag [ nao:prefLabel ?tag ] ;
                  nie:url ?file .
                  FILTER (!EXISTS { ?f rdf:type nfo:Image } )
            }'

The result was a bit depressing, as it only had considered the
"Keyword" Property of a few PDFs worthy for tags.

There is a 'tracker-tag' command you can use to play with tags in Tracker. Plus you can see what SPARQL it uses with:

  $ TRACKER_VERBOSITY=3 tracker-tag [options]

It is depressing I agree, but it depends on a lot of things:
a) supported file types
b) backends used for those file types
c) your content and how well it is written
   (e.g. some MP3s or JPEGs are badly formed and not standardised)

It's entirely possibly to fix these things of course :)

How exactly does tracker auto-generate tags?
From which file-types does it extract tags?

... without the nfo:Image FILTER I got 893 Tags from about 80000 image
files. As I use shotwell to organise my photos, I am quite stisfied
with tagging images (there is always room for improvement).

Yes, for images, tag support is quite reasonable. For PDFs, it's a bit touch and go because it really depends on the app writing or creating the PDF as well as what you define yourself. For other formats, it highly depends on support for tagging in the first place.

Support is limited sadly:

  $ git grep nao:Tag -- src/tracker-extract/*.c |awk '{print $1}'|uniq
  src/tracker-extract/tracker-extract-gif.c:
  src/tracker-extract/tracker-extract-jpeg.c:
  src/tracker-extract/tracker-extract-pdf.c:
  src/tracker-extract/tracker-extract-png.c:
  src/tracker-extract/tracker-extract-tiff.c:

However, we take patches ;)

--
Regards,
Martyn

Founder & Director @ Lanedo GmbH.
http://www.linkedin.com/in/martynrussell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]