wikipedia - SPARQL: retrieve all the info from DBpedia from a URI -


if want retrieve abstract uri, following:

prefix dbp_owl: <http://dbpedia.org/ontology/>   select distinct ?abstract { <http://dbpedia.org/resource/horizon_high_school_(thornton,_colorado)> dbp_owl:abstract ?abstract filter (lang(?abstract) = "en" )} 

if want retrieve thumbnail:

select distinct ?thumb { <http://dbpedia.org/resource/horizon_high_school_(thornton,_colorado)>  dbp_owl:thumbnail ?thumb } 

how can retrieve uri , not 1 property?

as retrieving multiple properties, can using variable in property position. e.g.,

select ?property ?value {   dbpedia:mount_monadnock ?property ?value } 

sparql results

note if try filter ?value here language, you'll miss lot of results, because results aren't literals, or aren't language tagged literals won't give value lang function. need restrict filter bit:

select ?property ?value {   dbpedia:mount_monadnock ?property ?value   filter ( !isliteral(?value)               #-- ?value not literal         || lang(?value) = ""                #-- ?value non-language tagged literal         || langmatches(lang(?value),"en"))  #-- ?value has language tag matching "en" } 

sparql results

note should not check languages =, langmatches instead. handle differences in capitalization, regional variants in language.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -