9

I am trying to write a SPARSQL query that will return all possible image URLs associated with a resource.

I can return the foaf:depiction, if there is one, but often when I visit said page on Wikipedia I see there are other pictures that I cannot 'get at'. For example - for video games - there is a Notion The Game cover and box art (for some games, not all), but I don't know how to get their URLs returned with queries.

An example showing exactly how to return, say a box cover and cartridge picture for a game like Super Mario Bros., would answer this question perfectly.

pnuts
  • 58,317
  • 11
  • 87
  • 139

2 Answers2

4

As far as I know, DBpedia only extracts the first image from each Wikipedia article, and it's not possible to get at the other images through DBpedia.

cygri
  • 9,412
  • 1
  • 25
  • 47
  • Hey cygri. Thanks for the response. If that's the case - how does one return even that single image with a sparql query? I often find the foaf:depiction value empty even though there is an image in the info box of the Wikipedia page. What am I missing? – Sean Patrick Sutton Jun 19 '11 at 14:43
  • I think that happens when the image isn't included directly in the infobox markup, but through some complex wikipedia template invocation that the DBpedia parser isn't able to figure out. If there's no `foaf:depiction` triple, you're probably out of luck. – cygri Jun 19 '11 at 20:13
  • is there any way to get at the information using other PREFIXes like dbpedia2 or rdf or whatever? Thanks – Sean Patrick Sutton Jun 19 '11 at 22:39
  • As far as I can tell, no. It's not in the RDF at all. – cygri Jun 20 '11 at 12:02
  • Cygri - thanks for taking the time out, and sorry for the delay getting back to you. Other sources confirm what you've said, so sadly it looks like a bit of scraping is in order :( Thanks again! – Sean Patrick Sutton Jul 06 '11 at 10:18
1

I agree with Cygri, however there are some extra notes

1) DBpedia extracts the first image from each Wikipedia article unless it has a "non-free" licence template

2) you can also use flickr images (non-wikipedia) from the flickr dataset [1] using the http://dbpedia.org/property/hasPhotoCollection property

[1] http://wiki.dbpedia.org/Downloads37#linkstoflickrwrappr

jimkont
  • 913
  • 1
  • 11
  • 18