Why is dbpedia-owl:wikiPageRedirects not returning the full set of redirect links? (Sparql)

后端 未结 2 1464
夕颜
夕颜 2020-11-28 17:11

I am using the following query :

select ?value where {   dbpedia-owl:wikiPageRedirects* ?value } 

相关标签:
2条回答
  • 2020-11-28 17:22

    Your direction was wrong.

    select distinct *
    where { 
      ?x dbpedia-owl:wikiPageRedirects <http://dbpedia.org/resource/Paris>
    } 
    
    0 讨论(0)
  • 2020-11-28 17:47

    Artemis's answer is right; the "direction" in the query is wrong. It's worth explaining that a bit more, though. On the DBpedia "page", you'll see lots of data like:

    dbpedia-owl:area      105400000.000000 (xsd:double)  
    dbpedia-owl:country   dbpedia:France  
    dbpedia-owl:inseeCode 75056 (xsd:integer)  
    dbpedia-owl:mayor     dbpedia:Anne_Hidalgo
    

    These mean that DBpedia contains triples where these are the predicates and objects. That is, DBpedia contains a triple:

    dbpedia:Paris dbpedia-owl:country dbpedia:France
    

    On other hand, you'll also see things like "is … of":

    is dbpedia-owl:beatifiedPlace of dbpedia:Daniel_Brottier
    is dbpedia-owl:billed         of dbpedia:René_Duprée
    

    These mean that dbpedia:Paris the object of triples with these subjects and predicates. E.g., DBpedia contains the triple

    dbpedia:René_Duprée dbpedia-owl:billed dbpedia:Paris
    

    The redirects properties that you're seeing are like this:

    is dbpedia-owl:wikiPageRedirects of dbpedia:City_of_Love_(city)
                                        dbpedia:Département_de_Paris
                                        dbpedia:Departement_de_Paris
                                        dbpedia:FRPAR
    

    That means that there are a bunch of triples of the form:

    ?something dbpedia-owl:wikiPageRedirects dbpedia:Paris
    

    and that means that your query needs to be

    select ?resource where {
      ?resource dbpedia-owl:wikiPageRedirects dbpedia:Paris
    }
    

    SPARQL results

    0 讨论(0)
提交回复
热议问题