Is querying the pagerank value on DBpedia no longer available?

Viewed 110

Since the Virtuoso version is updated recently, when I try to use the query below on the public DBpedai SPARQL endpoint. The result is empty.

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbo:<http://dbpedia.org/ontology/>
PREFIX vrank:<http://purl.org/voc/vrank#>

SELECT ?s ?v 
FROM <http://dbpedia.org> 
FROM <http://people.aifb.kit.edu/ath/#DBpedia_PageRank> 
WHERE {
?s rdf:type dbo:University.
?s vrank:hasRank/vrank:rankValue ?v.
}
ORDER BY DESC(?v) LIMIT 50

Thank you!

1 Answers

There is also the option to query the Wikidata endpoint via query federation and map the result to DBpedia URIs:

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX vrank: <http://purl.org/voc/vrank#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX schema: <http://schema.org/>

SELECT * WHERE {
  {
    SELECT DISTINCT ?uni (URI(REPLACE(str(?article), "https://en.wikipedia.org/wiki", "http://dbpedia.org/resource")) as ?dbpedia) WHERE {
      SERVICE <https://query.wikidata.org/sparql> {
        ?uni wdt:P31/wdt:P279* wd:Q3918.
        ?article schema:about ?uni .
        ?article schema:inLanguage "en" .
        ?article schema:isPartOf <https://en.wikipedia.org/> .
      }
    }
  }
  OPTIONAL {
    ?uni vrank:pagerank ?rank.
  }
} ORDER BY desc(?rank) LIMIT 50

Just run the HDT file with the Wikidata PageRank scores locally as explained on https://github.com/athalhammer/danker-hdt-docker. The result is cleaner (no resources such as dbpedia:Physics in the result set) and the query runs in < 3 seconds.

Related