2. Collection data
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 https://github.com/VUAmsterdam-UniversityLibrary/ubvu_bibles $ cd .. $ ./run.pl ?- 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 subset_selection.pl:
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 'http://accurator.nl/bible#Target' you can execute the following code:
The specified target (in this case
http://accurator.nl/bible#Target) 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('http://lod.taxonconcept.org/ontology/txn.owl#commonName', ['vogel', 'vogels'], 'http://accurator.nl/bird#Target','http://accurator.nl/bird#Campaign').