On 02.10.2017 12:06, Julien Plu wrote:
> UNION {
> VALUES ?p {rdf:type} .
> ?link ?p ?o .
> FILTER(CONTAINS(STR(?o), "http://dbpedia.org/ontology/")) .
> }
I would rewrite this. Given that you loaded the DBpedia ontology, you
can use
UNION {
?o a owl:Class .
?link rdf:type ?o .
}
The reason why this should work: I guess you simply want to avoid
classes from YAGO and schema.org, and those can be filtered out by the
triple pattern
?o a owl:Class
because only for the DBpedia classes matching triples are present in the
DBpedia ontology.
Cheers,
Lorenz