Search code examples
sparqldbpedia

Can I use SPARQL to query DBPedia for information about Wiki pages such as page length or number of times an article was accessed?


    SELECT *
WHERE {
?Person a <http://dbpedia.org/ontology/Comedian> .
?Person <http://dbpedia.org/ontology/influenced> ?influenced.
?Person <http://dbpedia.org/ontology/birthDate> ?birthDate.
?Person <http://dbpedia.org/ontology/wikiPageLength> ?weight.
}

I had thought that the above code would, when plugged into snorql, generate a dataset that included the length of the Comedian page being queried. Instead, it's generating an empty dataset. By contrast, the code below generates a non-empty dataset, but one which does not include the page length.

    SELECT *
WHERE {
?Person a <http://dbpedia.org/ontology/Comedian> .
?Person <http://dbpedia.org/ontology/influenced> ?influenced.
?Person <http://dbpedia.org/ontology/birthDate> ?birthDate.
}

Is there a way to query DBpedia for information about a Wikipedia page that isn't included in the page itself, such as the length of the page or the number of times it is accessed?


Solution

  • While there is such a property declared (e.g., see http://dbpedia.org/ontology/wikiPageLength), it doesn't appear to actually be used in describing any resources. E.g., the following query returns 0:

    select (count(*) as ?n) { ?s dbo:wikiPageLength ?l }