SE Semantically Tagging an Image

From Open Annotation Community Group
Jump to: navigation, search

Semantically Tagging an Image

A Tag is a label attached to someone or something for identification or other information. Typically tags are created attaching a free text label to a resource. With the emergence of the Linked Open Data method, semantic tagging or tagging through URIs is gaining popularity.

<< Back to the Cookbook

Example of Semantic Tag on Image

We here represent the semantic tagging of a Wikipedia image of the Eiffel Tower with the Eiffel Tower entry in dbpedia http://dbpedia.org/resource/Eiffel_Tower

Open Annotation Smantic Tag of Image Intro.png

Open Annotation Representation

The Target of the annotation is a Wikipedia image. The Body of the annotation is represented by the dbpedia entry http://dbpedia.org/resource/Eiffel_Tower. Such entry is classified as oa:Tag and the motivation driving the creation of the annotation is oa:tagging. In the semantic tag scenario we usually don't claim that the body (tag) is somehow 'about' the target. When tagging, the relation between the body and the target is an 'identification' or 'classification' relationship. In this particular example I would say that the body http://dbpedia.org/resource/Eiffel_Tower identifies the content of the picture. As http://dbpedia.org/resource/Eiffel_Tower identifies is a non-informational resource in DBpedia, it is sufficient to type the URI with oa:Tag.

The Annotation instance exhibits an oa:annotatedBy - the agent responsible for entering the information that is used to generate the Annotation - and a oa:serializedBy - the agent, likely software, generating the serialization of the Annotation's graph. Annotation and generation dates are also associated.

Open-Annotation CB Semantically Tagging An Image spec20130128.png

In RDF format:

ex:anno a oa:Annotation ;
   oa:hasTarget <http://alturl.com/xxbxn> ;
   oa:hasBody <http://dbpedia.org/resource/Eiffel_Tower>;
   oa:motivatedBy oa:tagging ;
   oa:annotatedBy ex:person1 ;
   oa:annotatedAt "2012-02-12T15:02:14Z" ;
   oa:serializedBy ex:software1 ;
   oa:serializedAt "2012-02-12T15:02:14Z" .
 
<http://dbpedia.org/resource/Eiffel_Tower> a oa:SemanticTag.
 
<http://alturl.com/xxbxn> a dctypes:Image ;
   dc:format "image/jpeg" .
 
ex:person1 a foaf:Person ;
   foaf:mbox <mailto:john.doe@example.org> ;
   foaf:name "John Doe" .
 
ex:software1 a prov:SoftwareAgent ;
   foaf:name "ExAnnotator" .

Some SPARQL queries

Select all the annotations for the target http://alturl.com/xxbxnn

SELECT ?anno WHERE { 
   ?anno oa:hasTarget <http://alturl.com/xxbxnn> . 
}
=> ex:anno

or

SELECT ?anno WHERE { 
   ?anno rdf:type oa:Annotation .
   ?anno oa:hasTarget <http://alturl.com/xxbxnn> . 
}
=> ex:anno

Select all the annotations by ex:person1 for the target http://alturl.com/xxbxnn

SELECT ?anno WHERE { 
   ?anno oa:hasTarget <http://alturl.com/xxbxnn> . 
   ?anno oa:annotatedBy ex:person1 . 
}
=> ex:anno

Select all the annotations by ex:person1 that include semantic tags

SELECT ?anno WHERE { 
   ?anno oa:annotatedBy ex:person1 . 
   ?anno oa:hasBody ?tag .
   ?tag rdf:type oa:SemanticTag.
}
=> ex:anno

Select all the semantic tags for the target http://alturl.com/xxbxnn

SELECT ?tag WHERE { 
   ?anno oa:hasTarget <http://alturl.com/xxbxnn> . 
   ?anno oa:hasBody ?tag .
   ?tag rdf:type oa:SemanticTag. 
}
=> <http://dbpedia.org/resource/Eiffel_Tower>

Select all the annotation targets tagged with the dbpedia entry http://dbpedia.org/resource/Eiffel_Tower

SELECT ?target WHERE {  
   ?anno oa:hasTarget ?target .
   ?anno oa:hasBody <http://dbpedia.org/resource/Eiffel_Tower> .
   <http://dbpedia.org/resource/Eiffel_Tower> rdf:type oa:SemanticTag.
}
=> <http://alturl.com/xxbxnn>


CREATOR: Paolo Ciccarese
LAST UPDATED: February 6, 2013

<< Back to the Cookbook