Reputation: 51
I have many DBpedia URIs I want to find the label and the type of these URIs. When I say type, I mean a relation that tells me that a specific URI refers to Apple the company while the other URI refers to Apple the fruit. Can any one help me to make a SPARQL query that after given a URI, it can find the label and type.
I hope it is clear.
Upvotes: 1
Views: 381
Reputation: 2934
learn SPARQL. its not difficult as it looks
try this query
replace my uri with the uri of apple change the value of prefix with the prefix you are using
PREFIX pref: <http://xyz/abc#>
SELECT ?s ?label ?type
WHERE {
?s ?p ?o .
FILTER (str(?s) = 'myURI').
?s pref:label ?label .
?s pref:type ?type
}
Upvotes: 1