Christian Becker
Chris Bizer

DBpedia is the Semantic Web version of Wikipedia and enables you to ask sophisticated queries against Wikipedia data. The flickr wrappr extends DBpedia with RDF links to photos posted on flickr. For each of the 1.95 million DBpedia concepts, the wrappr generates a collection of flickr photos that depict the concept.

Contents

  1. Introduction
  2. Some Examples
  3. Usage
  4. Architecture
  5. Technical Notes
  6. Linkage with DBpedia.org
  7. Geo-only queries
  8. Sourcecode
  9. Feedback

News

1. Introduction

flickr is one of the world's largest public photo repositories. It allows users to label their photos and apply a range of tag types, including geographical coordinates (geotags). In order to simplify usage for the photographer, there are no explicit rules addressing naming, level of detail, or relevance. As a result, labels may be provided in many languages, and accuracy as well as relevance varies greatly. Additionally, ambiguities may arise when photos are labeled using only generic terms (e.g. capitol), prohibiting semantic matching algorithms from deriving exact statements about them (e.g. "this is a picture of the Washington Capitol") in the absence of additional clues.

On the other hand, geotags are often applied in batches, e.g. one might put all his Berlin vacation pictures on one spot. To prevent misinterpretations in these cases, Flickr stores the zoom level at which a picture was geotagged as an accuracy measure and considers it during the search process. For example, when performing geographical searches using the Flickr API, only images tagged within street level view are returned by default. However, this solution can't prevent situations where users associate all their vacation photos with a specific landmark on street level.

The solution lies in combining search by topic and search by geographic location. Wikipedia provides an enormous collection of semi-structured content, from which the DBpedia.org project extracts structured information. As a result, DBpedia.org is able to provide multilingual labels and geographic location for many topics. By matching labels and geographic locations from both worlds, we can obtain highly relevant photos for many topics (that is, if they have an article in Wikipedia).

Photo collections are interlinked from DBpedia using dbpedia:hasPhotoCollection RDF links. You can use Semantic Web browsers like Marbles, Tabulator or DISCO to follow these links from a DBpedia concept to the photo collection depicting it.

2. Some Examples

3. Usage

The service is accessible at http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Entry

where Entry denotes the identifier of any article in the English Wikipedia, which can be found at the end of its URL (e.g. http://en.wikipedia.org/wiki/Berlin). For articles that are redirected (these are designated by the line Redirected from .... beneath the article title), the target article's identifier must be provided.

For testing purposes, the following query form may also be utilized:

Wikipedia Entry:

Results are returned in RDF using foaf:depiction predicates. Using HTTP content negotiation, HTML clients are provided with a preview, while RDF browsers are delivered plain RDF/XML data. This behaviour may be overridden by appending the parameter ?format=rdf or ?format=xhtml.

4. Architecture

The flickr™ wrappr is implemented as a small PHP script (250 lines of code). Whenever the script gets a lookup call for a Wikipedia entry, it queries DBpedia.org's SPARQL endpoint for related multilingual labels and geo-coordinates. This information is provided to the Flickr Search API, and results are generated in RDF using foaf:depiction predicates.

The wrappr implements content type negotiation in accordance with Linking Open Data Recommendations.

5. Technical Notes

6. Linkage with DBpedia.org

A separate tool creates http://dbpedia.org/property/hasPhotoCollection links for all articles of the English Wikipedia. These will soon be published and imported into the public DBpedia.org endpoint, enabling clients to obtain current photos for a given entry on demand.

7. Geo-only queries

7.1 Introduction

The flickr wrappr also supports pure geographic queries. In this case, no reconcilement with DBpedia.org is performed; the results correspond to the Flickr world map.

This service is accessible at http://www4.wiwiss.fu-berlin.de/flickrwrappr/location/latitude/longitude/radius where

7.2 Examples

7.3 Notes

8. Sourcecode

The sourcecode is available in the DBpedia.org SVN repository at https://dbpedia.svn.sourceforge.net/svnroot/dbpedia/related_apps/flickrwrappr.

9. Feedback

We are very interested in hearing your opinion about this service. Please send comments to Chris Bizer and Christian Becker.

Further information about our work in the area of the Semantic Web/Web-of-Data can be found at
List of our other open source projects @ Freie Universität Berlin