0

I have a dbpedia query and i want to rank my results by using the pageRank algorithm. there is some classes developed in dbpedia dataset specifique to this problem in http://vocab.sti2.at/vrank#paramValue. Now, i want to compute the pageRank of each resource of my result: the fraction of incoming links associated with that resource/ the total number of incoming links for all resource associated. This is my query:

PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
PREFIX vrank:<http://purl.org/voc/vrank#>
prefix dbo: <http://dbpedia.org/ontology/>
SELECT distinct  ?Nom ?resource ?url 
 WHERE{
   ?resource rdfs:label ?Nom.
   ?resource foaf:isPrimaryTopicOf ?url.
   ?Nom <bif:contains> "Apple".
   FILTER ( langMatches( lang(?Nom), "EN" )).
MINUS {?resource dbo:wikiPageRedirects|dbo:wikiPageDisambiguates  ?dis}
        } 

Please help me. Thanks in advance.

Adem
  • 113
  • 1
  • 10
  • You want to compute the pagerank on the fly? Or do you want to query for the pagerank. This depends on whether this data is loaded into the endpoint. Please note, that Virtuoso has also some support for returning a pagerank like score, but again this feature has to be enabled by the maintainer of the SPARQL endpoint. – UninformedUser Jan 11 '16 at 13:39
  • @AKSW I want to compute the page rank depending on the result. for example if my query is about resources containing the word "Apple", PageRank depend only to this result (depend on Apple result), and not to all dbpedia concepts. – Adem Jan 11 '16 at 14:10
  • As far as I know, this is not how the pagerank algorithm works as this is an iterative algorithm until a fixpoint is reached. The only thing you can do is query for existing scores in the dataset of exist or try to use the Virtuoso pagerank function if enabled. For DBpedia there is already a pagerank dataset, the question is whether it's loaded in the endpoint you're using. – UninformedUser Jan 11 '16 at 16:03

1 Answers1

0

Check this out

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

http://people.aifb.kit.edu/ath/