DBpedia SPARQL and predicate join

I have a problem with the DBpedia SPARQL endpoint, because property properties such as label rdf:typeare not stored at the endpoint. Therefore, when I run this query:

SELECT * 
WHERE{
  <http://dbpedia.org/ontology/Place> ?predicat ?object .
  OPTIONAL{?predicat rdfs:label ?label}
}

I have nothing for the shortcut.

If someone had an idea to solve this problem, it would be very useful.

+3
source share
2 answers

You cannot get real tags from DBpedia because the SPARQL endpoint does not have them. But you can take the local name of the property URI. So, for rdfs: subClassOf you get "subClassOf". This is better than nothing. This can be done using the Virtuoso (non-standard) function bif:regexp_replace.

SELECT DISTINCT (bif:regexp_replace(STR(?p), "^.*[/#]", "") AS ?label) WHERE {
   <http://dbpedia.org/ontology/Place> ?p ?o .
}
+2
source

, SPARQL. Dbpedia , SPARQL RDF W3C. , Virtuoso dbpedia , SPARQL W3C.

.

0

All Articles