r - Counting numbers of DBpedia wikilink and external link using SPARQL -
i querying dbpedia list of person names using sparql package in r. , working on counting of different categories 1 person, such number of wikilink or external_link. know count items per person, such as:
query= "select count (*){ <http://dbpedia.org/resource/philipp_melanchthon> ?p ?o }" this print out count of items 1 person, there way print out count of different categories 1 person respectively? many thx.
as pointed out following query gives relations , objects related it:
select distinct *{ dbpedia:philipp_melanchthon ?p ?o. } if want find out external links, need replace ?p appropriate property in case dbpedia-owl:wikipageexternallink:
select distinct *{ dbpedia:philipp_melanchthon dbpedia-owl:wikipageexternallink ?o. } thus count give external links:
select (count(?o)){ dbpedia:philipp_melanchthon dbpedia-owl:wikipageexternallink ?o. }
Comments
Post a Comment