2

I've just started working with DBpedia and SPARQL. I want to use it as followed:

Getting an input x, I want to return the "Wikipage disambiguates" of x, where x is a possible value of "Wikipage redirect". In other words, I want to search all the "Wikipage disambiguates" looking for x and returning its corresponding "Wikipage disambiguates".

I want to use it on Educational organizations: http://dbpedia.org/fct/facet.vsp?iri=http%3A%2F%2Fschema.org%2FEducationalOrganization&sid=3532&cmd=new_with_class and on general organizations: http://dbpedia.org/fct/facet.vsp?iri=http%3A%2F%2Fdbpedia.org%2Fontology%2FCompany&sid=3537&cmd=new_with_class

Therefore I wanted to ask for your help - What is the required query I need to ask?

PS: I was searching desperately for tutorials for working with SPARQL and DBpedia and couldn't find anything that hits my goal. Can you recommend me any?

Thanks! :)

Ben Companjen
  • 1,305
  • 9
  • 24
Maoritzio
  • 1,062
  • 2
  • 11
  • 28

1 Answers1

5

Probably, you are looking something like:

1) Finding all redirects for a given resource: Find redirects :

select ?x
where {
?x <http://dbpedia.org/ontology/wikiPageRedirects> <http://dbpedia.org/resource/Harvard_University>
}
limit 10

Result:

2) Find all wikiPageDisambiguates of 'X' where 'X' is one of the above :

select ?x ?y
where {
  <http://dbpedia.org/resource/University_of_Harvard> <http://dbpedia.org/ontology/wikiPageRedirects> ?y.     
  ?x <http://dbpedia.org/ontology/wikiPageDisambiguates> ?y.
}
limit 10

Result:

You can test/save/share different queries at s3space.

Ben Companjen
  • 1,305
  • 9
  • 24
Amit
  • 642
  • 6
  • 8