Obtain citizenship using DBPedia and SPARQL

I have the following SPARQL query:

SELECT ?nationalityLabel WHERE {
  dbpedia:Henrik_Ibsen dbpedia-owl:nationality ?nationality .
  ?nationality rdfs:label ?nationalityLabel .
}

I verified that Henrik Ibsen exists and that he has a national ontology / property: http://dbpedia.org/page/Henrik_Ibsen

And this is an ontology: http://dbpedia.org/ontology/nationality

A very similar request to this, indicated here: https://stackoverflow.com/a/212618/

The problem is that the query does not return any result.

If I could get help with this, it would be great.

Summary decision: Both answers were great, so they were both, but landed on Joshua, in the end, because they reported that the dbpedia owl was cleaner. The optimal solution in my opinion:

dbpedia-owl :

select ?label { 
 dbpedia:Henrik_Ibsen
   dbpedia-owl:birthPlace
     [ a dbpedia-owl:Country ;
       rdfs:label ?label ]
 filter langMatches(lang(?label),"en")
}

, :

select ?label { 
 dbpedia:Norway dbpedia-owl:demonym ?label
 filter langMatches(lang(?label),"en")
}

, "" :

SELECT
  ?nationality
WHERE {
  dbpedia:Henrik_Ibsen dbpprop:nationality ?nationality .
 filter langMatches(lang(?nationality),"en")
}

, "" , , , , , .

+3
2

, dbpprop:nationality, . , dbpedia-owl:nationality, , , . dbpprop:nationality, , , , , RDF, ?nationality rdfs:label ?nationalityLabel .

DBpedia (dbpedia-owl) , dbpprop, , dbpedia-owl, . dbpedia-owl:birthPlace. :

select ?label { 
 dbpedia:Henrik_Ibsen
   dbpedia-owl:birthPlace
     [ a dbpedia-owl:Country ;
       rdfs:label ?label ]
}

SPARQL

, :

select ?label { 
 dbpedia:Henrik_Ibsen
   dbpedia-owl:birthPlace
     [ a dbpedia-owl:Country ;
       rdfs:label ?label ]
 filter langMatches(lang(?label),"en")
}

SPARQL

, demonym, dbpedia-owl:demonym , . , , , DBpedia , . ,

select ?name ?demonym { 
  dbpedia:Henrik_Ibsen dbpedia-owl:birthPlace ?country .
  ?country a dbpedia-owl:Country ; rdfs:label ?name .
  optional { ?country dbpedia-owl:demonym ?demonym }

  filter langMatches(lang(?name),"en")
  filter langMatches(lang(?demonym),"en")
}

SPARQL

+3

:

  • dbpprop:
  • , , . EDIT: * Joshua Taylor , , dbprop:nationality , , dbpprop:nationality. , , dbpedia-owl:nationality, . , Henrik_Ibsen dbpedia-owl:nationality *

().

SELECT
  #### ?label ####    See Edit
  ?nationality

WHERE {
  dbpedia:Henrik_Ibsen dbpprop:nationality ?nationality .
  #### OPTIONAL { ?nationality rdfs:label ?label . } #### See Edit.
}
+1

All Articles