|
I am fairly new to RDF and Sparql, the concept is still somewhat confusing to me.
I am doing a very simple exercise in which I will be extracting a list of cities from I have tried many ways to get a list of names of all the cities in quebec, so far with no luck. All the results were empty. this is the query I've written so far:
what did I do wrong? Thanks |
|
I started by querying for { ?s ?p <http://dbpedia.org/resource/Category:Cities_and_towns_in_Quebec> } just to see what we had to work with and eventually came up with this: SELECT ?name WHERE {
?city skos:broader <http://dbpedia.org/resource/Category:Cities_and_towns_in_Quebec> .
?city rdfs:label ?name .
}
The categories in DBpedia are instances of skos:Concept, so I don't believe you'll see any typing about them being in other classes as well. (It was nice to see Saint-Hyacinthe among the answers; that's where my great-great grandfather came from 175 years ago.) Bob Not related with the question but why were on DBpedia cities represented as a skos:Concept rather than an instance of, say, dbpedia-owl:City? Very related, actually; because that's how DBpedia models categories. |

