rdf - getting all dbpedia predicate list -
this question has answer here:
i trying dbpedia predicate (labels of property). check link
http://dbpedia.org/page/akshay_kumar
i wan get,
dbpedia-owl:abstract dbpedia-owl:birthdate dcterms:subject dc:description rdfs:label owl:sameas foaf:givenname
in short, properties on left column. not entity entire list.
please see, properties can retrived using:
select distinct ?property { ?instance <http://dbpedia.org/ontology/person> . ?instance ?property ?obj . }
or
select * { ?x rdf:property }
but want prefix
dbpedia-owl
, dc
, foaf
, rdfs
etc
this based on modification of my answer sparql query class label namespace prefix defined.
select distinct ?prettyname ?property { #-- distinct properties used on persons { select distinct ?property { [ dbpedia-owl:person ; ?property [] ] } } #-- specify uris used #-- prefixes , prefix name #-- gets used values (?prefixuri ?prefixname) { (dbpedia-owl: "dbpedia-owl") (dbpprop: "dbpprop") (foaf: "foaf") #-- ...more... } #-- consider properties #-- begin 1 of prefixes filter strstarts(str(?property),str(?prefixuri)) #-- generate pretty name bind(concat(?prefixname,":",strafter(str(?property),str(?prefixuri))) ?prettyname) } limit 1000
prettyname property ------------------------------------------------------- dbpprop:hasphotocollection http://dbpedia.org/property/hasphotocollection dbpprop:subwins http://dbpedia.org/property/subwins foaf:homepage http://xmlns.com/foaf/0.1/homepage dbpedia-owl:wikipageexternallink http://dbpedia.org/ontology/wikipageexternallink ...
Comments
Post a Comment