monojohnny
monojohnny

Reputation: 6171

DBPedia SPARQL query "NaturalPerson" brings back no data?

The following brings back a list of people - relating to a pages about Podcasts:

SELECT *
WHERE
{
?person rdf:type dbo:Person,foaf:Person,schema:Person;
        rdfs:label ?name;       
        dbo:wikiPageWikiLink dbr:Podcast.
FILTER(lang(?name)='en').
}

Run it here

But this one brings back nothing:

SELECT *
WHERE
{
?person rdf:type dbo:Person,foaf:Person,schema:Person, dul:NaturalPerson;
        rdfs:label ?name;       
        dbo:wikiPageWikiLink dbr:Podcast.
FILTER(lang(?name)='en').
}

Run it here

Am I using dul:NaturalPerson in the wrong way? Checking a couple of examples, I can't seem to see why it is different to others. For instance:

https://dbpedia.org/page/Joe_Rogan has all dbo:Person,foaf:Person,schema:Person, dul:NaturalPerson properties present.

Background:

I'm trying to narrow down my search - some of the pages aren't actually people, they are the Podcasts themselves. In doing this - I'm trying to add in various 'Person' objects from different vocabs - although I fear this won't achieve my objectives (since I can't seem to find a differentiating property) - but in doing so - I stumbled upon this.

Upvotes: 1

Views: 54

Answers (2)

Kingsley Uyi Idehen
Kingsley Uyi Idehen

Reputation: 925

Here's a SPARQL Query Solution page that provides results. Here's the associated SPARQL Query Definition page which shows incorporation of namespace prefix declarations that solve the problem.

prefix dbo:    <http://dbpedia.org/ontology/> 
prefix foaf:   <http://xmlns.com/foaf/0.1/> 
prefix schema: <http://schema.org/> 
prefix dul:   <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> 

Upvotes: 1

Ortomala Lokni
Ortomala Lokni

Reputation: 62456

If you look at the RDF/N3 serialization of Joe Rogan, you will find:

@prefix dbo:    <http://dbpedia.org/ontology/> .
@prefix foaf:   <http://xmlns.com/foaf/0.1/> .
@prefix schema: <http://schema.org/> .
@prefix ns14:   <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .

The same prefixes appears in the turtle serialization. The dul prefix is never defined explicitly. I don't know the reason of this but this could explain your empty result.

Moreover you should note that in the DBPeadia ontology there is an owl:equivalentClass relation between foaf:Person, schema:Person, wikidata:Q215627, wikidata:Q5 and dul:NaturalPerson.

Upvotes: 1

Related Questions