SPARQL

Sparql can be used to query structured data sets like DBPedia.
These queries can be run on SPAQL enpoints like http://lod.openlinksw.com/sparql or http://dbpedia.org/sparql/. The queries can be slightly different, but for an experienced SPARQLer (which I hope to be one day) this won't be a problem.

Here are a few of my first queries, the structure will be purpose followed by the query:

The urban and metro population of Patna
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbr: <http://dbpedia.org/resource/>

select ?populationUrban  ?populationMetro where {
  dbpedia:Patna  dbo:populationUrban ?populationUrban;
                 dbo:populationMetro ?populationMetro  .
}

Details of Hemmingway:
prefix dbpedia: <http://dbpedia.org/resource/>
prefix dbpedia-owl: <http://dbpedia.org/ontology/>

select ?abstract ?thumbnail where { 
  dbpedia:Ernest_Hemingway dbpedia-owl:abstract ?abstract ;
                           dbpedia-owl:thumbnail ?thumbnail .
  filter(langMatches(lang(?abstract),"en"))
}

Comments

Popular posts from this blog

Using cookies with HttpURLConnection

ffmpeg for Google Speech API