Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

2. Collection data

LaraHack edited this page Mar 18, 2016 · 5 revisions

Accurator works with image collections defined using RDF metadata. Below are instructions on how to load a collection and how to select a subset of images you would like to be annotated.

Load collection data

Continuing from the setup instructions we create a folder for the RDF data:

$ cd ..
$ ls
  ClioPatria  accurator
$ mkdir data
$ cd data

Clone a repository with RDF and a void file describing the data and load the data after starting the server. Here we download UBVU collection data:

$ git clone
$ cd ..
$ ./
?- use_module(library(semweb/rdf_library)).
?- rdf_attach_library('../data/ubvu_bibles/').
?- rdf_list_library.
?- rdf_load_library('UBVU-bibles',[]).

Create an annotation subset

Often only a subset of a collection should be included in an annotation domain (e.g. only works depicting birds). Accurator caters for this requirement by providing the option to specify annotation targets, were the target is defined as an RDF type in the triple store. Accurator provides a number of options to identify targets, using code in

  • target_graph - make all the images in the specified graph targets
  • text_contains_label - retrieves a set of labels from a taxonomy and scans the descriptions of images for the presence of these labels, if a label is present, the image is tagged with the concept and targeted for annotation
  • target_prefix - target images which have a subject with the specified prefix
  • target_iconclass_code - target images that have the specified Iconclass code as subject, or a concept below the Iconclass code

To target the UBVU image in the collection graph you just loaded with the type '' you can execute the following code:

target_graph('', '','').

The specified target (in this case is later used while defining an annotation domain. In taxonomies we explain how to load a taxonomy which can be used in the annotation process.

To target objects with descriptions including common names of biological taxonomies (adding the wildcard keywords vogel and vogels):

text_contains_label('', ['vogel', 'vogels'], '','').