SlideShare uma empresa Scribd logo
1 de 45
Baixar para ler offline
The	
  Seman)c	
  Web	
  
RDF,	
  SPARQL	
  and	
  so0ware	
  
APIs	
  
4IZ440	
  Knowledge	
  Representa4on	
  and	
  Reasoning	
  on	
  the	
  WWW	
  
Josef	
  Petrák	
  |	
  me@jspetrak.name	
  
	
  
Worth	
  a	
  note	
  
§  Open	
  Data	
  iniDave	
  around	
  world	
  and	
  Europe	
  open	
  staDsDcal	
  and	
  
    government	
  data,	
  usually	
  in	
  RDF	
  format.	
  
§  It	
  has	
  several	
  success	
  stories	
  
    §  hLp://headtoweb.posterous.com/open-­‐data-­‐success-­‐stories	
  
§  Google	
  is	
  integraDng	
  RDF	
  encoded	
  as	
  RDFa	
  in	
  pages	
  into	
  its	
  search	
  
    results.	
  

§  UEP	
  is	
  not	
  behind	
  –	
  DIKE	
  research	
  group	
  KEG	
  started	
  Czech–Slovak	
  
    semanDc	
  iniDaDve	
  called	
  SemanDcs	
  
§  And	
  we	
  have	
  a	
  RDF-­‐based	
  website	
  deployed,	
  see	
  
    hLp://keg.vse.cz/	
  
Outline	
  
§  RDF	
  representaDon	
  formats	
  
§  Data	
  handling	
  approaches	
  
§  So0ware	
  APIs	
  overview	
  
§  Approaches	
  in	
  examples	
  
§  MoDvaDon	
  example:	
  web	
  applicaDon	
  
RDF	
  representaDon	
  
Syntaxes	
  
§  RDF	
  has	
  several	
  syntaxes.	
  
§  A	
  “graph”	
  is	
  the	
  reference	
  syntax.	
  
§  The	
  W3C	
  endorsed	
  file	
  format	
  is	
  RDF/XML	
  
§  Other	
  file	
  formats:	
  
   §  N-­‐Triples	
  
   §  N3	
  
   §  RDF/JSON	
  
   §  RDFa	
  
RDF	
  graph 	
  	
  
                            rdf:type	
                            gd:Person	
  



                            gd:name	
                          John	
  Example	
  


          gd:affiliaDon	
  
                                           Sample	
  Corp.	
  Inc.	
  



PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>	
PREFIX gd: <http://rdf.data-vocabulary.org/#>
RDF/XML	
  
<rdf:RDF	
  
	
  	
  xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”	
  
	
  	
  xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>	
  
	
  	
  <rdf:Resource>	
  
	
  	
  	
  	
  <rdf:type	
  rdf:resource=“http://rdf.data-­‐vocabulary.org/#Person”/>	
  
	
  	
  	
  	
  <gd:name>John	
  Example</gd:name>	
  
	
  	
  	
  	
  <gd:affiliation>Sample	
  Corp.	
  Inc.</gd:affiliation>	
  
	
  	
  </rdf:Resource>	
  
</rdf:RDF>	
  
RDF/XML	
  (shortened)	
  
<rdf:RDF	
  
	
  	
  xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”	
  
	
  	
  xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>	
  
	
  	
  <gd:Person>	
  
	
  	
  	
  	
  <gd:name>John	
  Example</gd:name>	
  
	
  	
  	
  	
  <gd:affiliation>Sample	
  Corp.	
  Inc.</gd:affiliation>	
  
	
  	
  </gd:Person>	
  
</rdf:RDF>	
  
N3	
  NotaDon	
  
@prefix	
  gd:	
  <http://rdf.data-­‐vocabulary.org/#>	
  .	
  
	
  
[]	
  a	
  gd:Person;	
  
	
  	
  gd:name	
  “John	
  Example”;	
  
	
  	
  gd:affiliation	
  “Sample	
  Corp.	
  Inc.”	
  .	
  
N–Triples	
  
_:a	
  <http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#type>	
  	
  
           	
  <http://rdf.data-­‐vocabulary.org/#Person>	
  .	
  
_:a	
  <http://rdf.data-­‐vocabulary.org/#name>	
  	
  
           	
  “John	
  Example”	
  .	
  
_:a	
  <http://rdf.data-­‐vocabulary.org/#affiliation>	
  	
  
           	
  “Sample	
  Corp.	
  Inc.”	
  .	
  
	
§  Primarily	
  used	
  to	
  defined	
  RDF	
  test	
  cases	
  
§  Subset	
  of	
  N3	
  NotaDon	
  
RDF/JSON	
  
{	
  
	
  	
  “_:a“	
  :	
  {	
  
	
  	
  	
  	
  “http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”	
  :	
  [	
  
	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  “value“	
  :	
  “http://rdf.data-­‐vocabulary.org/#Person”,	
  “type“	
  :	
  “uri“	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  ],	
  
	
  	
  	
  	
  “http://rdf.data-­‐vocabulary.org/#name”	
  :	
  [	
  
	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  “value“	
  :	
  “John	
  Example“,	
  “type“	
  :	
  “literal“	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  ],	
  
	
  	
  	
  	
  “http://rdf.data-­‐vocabulary.org/#affiliation”	
  :	
  [	
  
	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  “value“	
  :	
  “Sample	
  Corp.	
  Inc.“,	
  “type“	
  :	
  “literal“	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  ]	
  
	
  	
  }	
  
}	
  
RDFa	
  
<html	
  
	
  	
  xmlns=“http://www.w3.org/1999/xhtml”	
  
	
  	
  xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”	
  
	
  	
  xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>	
  
	
  
<p	
  typeof=“gd:Person”>	
  
	
  	
  <em	
  property=“gd:name”>John	
  Example</em>	
  is	
  working	
  	
  
	
  	
  at	
  <em	
  property=“gd:affiliation”>Sample	
  Corp.	
  Inc.</em>.	
  
</p>	
  
	
  
</html>	
  
Resources	
  about	
  RDF	
  formats	
  
§  RDF/XML	
  
    §  hLp://www.w3.org/TR/rdf-­‐syntax-­‐grammar/	
  
§  N3	
  NotaDon	
  
    §  hLp://www.w3.org/DesignIssues/NotaDon3	
  
    §  hLp://www.w3.org/2000/10/swap/Primer	
  
§  N–Triples	
  
    §  hLp://www.w3.org/TR/rdf-­‐testcases/#ntriples	
  
§  RDF/JSON	
  
    §  hLp://n2.talis.com/wiki/RDF_JSON_SpecificaDon	
  
§  RDFa	
  
    §  hLp://www.w3.org/TR/rdfa-­‐syntax/	
  
Task	
  #1	
  
1.  Use	
  Google	
  Data	
  Vocabulary	
  
   §  hLp://www.data-­‐vocabulary.org/Person/	
  
2.  Created	
  a	
  NotaDon3	
  file	
  with	
  demo	
  data	
  about	
  people	
  
Data	
  handling	
  
RDF	
  models	
  
§  Statement–centric	
  
   §  Working	
  with	
  triples	
  of	
  ?subject	
  ?predicate	
  ?object	
  
§  Resource–centric	
  
   §  Working	
  with	
  resources	
  having	
  properDes	
  and	
  their	
  values	
  
§  Ontology–centric	
  
   §  Working	
  with	
  classes,	
  properDes,	
  and	
  individuals	
  as	
  defined	
  in	
  selected	
  
       vocabulary/schema/ontology	
  
§  Named	
  graph	
  
   §  Triples	
  belongs	
  to	
  a	
  graph	
  with	
  URI	
  name	
  
   §  Working	
  with	
  quads	
  of	
  ?graph	
  ?subject	
  ?predicate	
  ?object	
  
So0ware	
  APIs	
  
Java	
  
§  Jena	
  
    §  hLp://openjena.org/	
  
    §  hLp://sourceforge.net/projects/jena/	
  
§  Sesame	
  
    §  hLp://www.openrdf.org/	
  
§  Shellac	
  RDFa	
  Parser	
  
    §  hLps://github.com/shellac/java-­‐rdfa	
  
PHP	
  
§  RDF	
  API	
  for	
  PHP	
  (RAP)	
  
    §  hLp://www4.wiwiss.fu-­‐berlin.de/bizer/rdfapi/	
  
    §  hLp://sourceforge.net/projects/rdfapi-­‐php/	
  
§  ARC2	
  
    §  hLp://arc.semsol.org/	
  
Ruby	
  
§  RDF.rb	
  
    §  hLp://rdf.rubyforge.org/	
  
    §  hLps://github.com/bendiken/rdf	
  
    §  Plus	
  various	
  modules	
  
Code	
  Examples	
  
File-­‐read	
  
§  Task:	
  Read	
  RDF	
  data	
  from	
  a	
  NotaDon3	
  file	
  format	
  into	
  memory	
  
    model.	
  
Read	
  N3	
  (Jena)	
  
InputStream	
  is	
  =	
  	
  
	
  	
  FileManager.get().open("samples/people.n3");	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  
Model	
  model	
  =	
  ModelFactory.createDefaultModel();	
  
RDFReader	
  r	
  =	
  model.getReader("N3");	
  
r.read(model,	
  is,	
  null);	
  
is.close();	
  
Read	
  N3	
  (RDF.rb)	
  
repository	
  =	
  RDF::Repository.new	
  
	
  
RDF::N3::Reader.open(‘samples/people.n3’)	
  {	
  |reader|	
  
	
  	
  repository	
  <<	
  	
  reader	
  
}	
  
Read	
  N3	
  (ARC2)	
  
$parser	
  =	
  ARC2::getRDFParser();	
  
$parser-­‐>parse(‘samples/people.n3');	
  
     	
  	
  
$triples	
  =	
  $parser-­‐>getTriples();	
  
Read	
  N3	
  (RAP)	
  
$model	
  =	
  ModelFactory::getDefaultModel();	
  
$model-­‐>load('samples/people.n3');	
  

§  This	
  code	
  won’t	
  run,	
  because	
  there	
  is	
  N3Reader	
  bug.	
  
§  Works	
  also	
  for	
  RDF/XML	
  and	
  N–Triples	
  formats.	
  
Traverse	
  triples	
  
§  Task:	
  Take	
  a	
  memory	
  model	
  and	
  list	
  all	
  or	
  parDcular	
  RDF	
  triples.	
  
Traverse	
  triples	
  (Jena)	
  
Model	
  model	
  =	
  ModelFactory.createDefaultModel();	
  
//	
  Load	
  data	
  into	
  model	
  
	
  	
  	
  	
  	
  	
  	
  
StmtIterator	
  i	
  =	
  model.listStatements();	
  
while	
  (i.hasNext())	
  {	
  
	
  	
  Statement	
  stmt	
  =	
  i.nextStatement();	
  
	
  	
  Resource	
  subject	
  =	
  stmt.getSubject();	
  
	
  	
  Property	
  predicate	
  =	
  stmt.getPredicate();	
  
	
  	
  RDFNode	
  object	
  =	
  stmt.getObject();	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  //	
  Printing	
  out	
  
}	
  
Query	
  Model	
  (Jena)	
  
Resource	
  rPerson	
  =	
  model.getResource("http://rdf.data-­‐
vocabulary.org/#Person");	
  
Property	
  rName	
  =	
  model.getProperty("http://rdf.data-­‐vocabulary.org/
#name");	
  
	
  
StmtIterator	
  si	
  =	
  model.listStatements(null,	
  RDF.type,	
  rPerson);	
  
while	
  (si.hasNext())	
  {	
  
	
  	
  Resource	
  r	
  =	
  si.nextStatement().getSubject();	
  
	
  	
  StmtIterator	
  sii	
  =	
  model.listStatements(r,	
  rName,	
  (RDFNode)null);	
  
	
  	
  if	
  (sii.hasNext())	
  {	
  
	
  	
  	
  	
  System.out.println(sii.nextStatement().getObject().toString());	
  
	
  	
  }	
  
}	
  
Traverse	
  triples	
  (RDF.rb)	
  
repository	
  =	
  RDF::Repository.new	
  
#	
  Load	
  data	
  
	
  
repository.each_statement	
  {	
  |statement|	
  
	
  	
  puts	
  statement	
  
}	
  
Query	
  model	
  (RDF.rb)	
  
GD	
  =	
  RDF::Vocabulary.new('http://rdf.data-­‐vocabulary.org/#')	
  
	
  
repository	
  =	
  RDF::Repository.new	
  
#	
  Load	
  data	
  
	
  
query	
  =	
  RDF::Query.new({	
  
	
  	
  :person	
  =>	
  {	
  
	
  	
  	
  	
  RDF.type	
  =>	
  GD.Person,	
  GD.name	
  =>	
  :name	
  
	
  	
  }	
  
})	
  
	
  
query.execute(graph).each	
  do	
  |person|	
  
	
  	
  puts	
  "name=#{person.name}"	
  
end	
  
Query	
  SPARQL	
  Endpoint	
  
§  Task:	
  Query	
  a	
  SPARQL	
  endpoint	
  and	
  write	
  out	
  the	
  data.	
  E.g.	
  from	
  
    DBPedia,	
  write	
  one	
  random	
  blackboard	
  gag	
  wriLen	
  by	
  Bart	
  
    Simpson.	
  
Query	
  SPARQL	
  Endpoint	
  (Jena)	
  
String	
  qa	
  =	
  "PREFIX	
  skos:	
  <http://www.w3.org/2004/02/skos/core#>"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "PREFIX	
  dbpprop:	
  <http://dbpedia.org/property/>"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "PREFIX	
  dcterms:	
  <http://purl.org/dc/terms/>"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "PREFIX	
  rdfs:	
  <http://www.w3.org/2000/01/rdf-­‐schema#>"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "SELECT	
  ?gag	
  WHERE	
  {	
  "	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "?series	
  skos:broader	
  <http://dbpedia.org/resource/
Category:The_Simpsons_episodes>	
  ."	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "	
  	
  ?episode	
  dcterms:subject	
  ?series	
  ."	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "	
  	
  ?episode	
  dbpprop:blackboard	
  ?gag	
  ."	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "}"	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  +	
  "LIMIT	
  1000";	
  
Query	
  q	
  =	
  QueryFactory.create(qa);	
  	
  	
  	
  	
  	
  	
  	
  	
  
QueryExecution	
  qe	
  =	
  	
  
	
  	
  QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql",	
  q);	
  
ResultSet	
  rs	
  =	
  qe.execSelect();	
  
ResultSetFormatter.out(System.out,	
  rs,	
  q);	
  
qe.close();	
  
Query	
  SPARQL	
  Endpoint	
  (RDF.rb)	
  
sparql	
  =	
  	
  
	
  	
  SPARQL::Client.new("http://dbpedia.org/sparql")	
  
	
  
result	
  =	
  sparql.query("SELECT	
  ?gag	
  WHERE	
  {	
  	
  
	
  	
  ?series	
  skos:broader	
  <http://dbpedia.org/resource/
Category:The_Simpsons_episodes>	
  .	
  
	
  	
  ?episode	
  dcterms:subject	
  ?series	
  .	
  
	
  	
  ?episode	
  dbpprop:blackboard	
  ?gag	
  .	
  
}	
  
LIMIT	
  1000")	
  
	
  
puts	
  result[rand(result.length)][:gag]	
  
Query	
  SPARQL	
  Endpoint	
  (RAP)	
  
$client	
  =	
  	
  
	
  	
  ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/
example");	
  
	
  
$query	
  =	
  new	
  ClientQuery();	
  
$query-­‐>query(‘PREFIX	
  skos:	
  <http://www.w3.org/2004/02/skos/core#>	
  
               	
  PREFIX	
  dbpprop:	
  <http://dbpedia.org/property/>	
  
               	
  PREFIX	
  dcterms:	
  <http://purl.org/dc/terms/>	
  
               	
  PREFIX	
  rdfs:	
  <http://www.w3.org/2000/01/rdf-­‐schema#>	
  
               	
  SELECT	
  ?gag	
  WHERE	
  {	
  
               	
  	
  	
  ?series	
  skos:broader	
  <http://dbpedia.org/resource/
Category:The_Simpsons_episodes>	
  .	
  
               	
  	
  	
  ?episode	
  dcterms:subject	
  ?series	
  .	
  
               	
  	
  	
  ?episode	
  dbpprop:blackboard	
  ?gag	
  .	
  
               	
  }	
  LIMIT	
  1000’);	
  
$result	
  =	
  $client-­‐>query($query);	
  
	
  
foreach($result	
  as	
  $line){	
  echo($line['?gag']-­‐>toString());	
  }	
  
Query	
  SPARQL	
  Endpoint	
  (ARC2)	
  
$store	
  =	
  	
  
	
  	
  ARC2::getRemoteStore(	
  
	
  	
  	
  	
  array('remote_store_endpoint'	
  =>	
  'http://dbpedia.org/sparql'));	
  
	
  
$q	
  =	
  ‘PREFIX	
  skos:	
  <http://www.w3.org/2004/02/skos/core#>	
  
                    	
  PREFIX	
  dbpprop:	
  <http://dbpedia.org/property/>	
  
                    	
  PREFIX	
  dcterms:	
  <http://purl.org/dc/terms/>	
  
                    	
  PREFIX	
  rdfs:	
  <http://www.w3.org/2000/01/rdf-­‐schema#>	
  
                    	
  SELECT	
  ?gag	
  WHERE	
  {	
  
                    	
  	
  	
  ?series	
  skos:broader	
  <http://dbpedia.org/resource/
Category:The_Simpsons_episodes>	
  .	
  
                    	
  	
  	
  ?episode	
  dcterms:subject	
  ?series	
  .	
  
                    	
  	
  	
  ?episode	
  dbpprop:blackboard	
  ?gag	
  .	
  
                    	
  }	
  LIMIT	
  1000’;	
  
	
  
$rows	
  =	
  $store-­‐>query($q,	
  'rows');	
  
	
  
Task	
  #2	
  
1.  Select	
  one	
  of	
  frameworks	
  (preferably	
  Jena)	
  
2.  Load	
  data	
  from	
  your	
  NotaDon3	
  file	
  
3.  Write	
  out	
  names	
  and	
  work	
  Dtles	
  of	
  people	
  
MoDvaDon	
  Example	
  
Knowledge	
  Engineering	
  Group	
  
Website	
  
§  hLp://keg.vse.cz/	
  
§  RDF	
  outside	
  
    §  Data	
  dumps	
  in	
  RDF/XML	
  
    §  Web	
  pages	
  enriched	
  with	
  RDFa	
  
§  RDF	
  inside	
  
    §  Data	
  created	
  by	
  SPARQL	
  INSERT	
  
    §  Data	
  queried	
  by	
  SPARQL	
  SELECT	
  
    §  Data	
  updated	
  by	
  SPARQL	
  DELETE	
  and	
  SELECT	
  
    §  Data	
  manipulated	
  by	
  user–friendly	
  forms	
  
§  Ongoing:	
  data	
  integraDon	
  with	
  ISIS	
  VŠE	
  and	
  other	
  department	
  
    applicaDons	
  
SPARQL:	
  Create	
  data	
  
INSERT	
  INTO	
  <http://keg.vse.cz/>	
  {	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  rdf:type	
  ical:Vevent	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:uid	
  ”1"	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:summary	
  ”IZI440"	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:dtstart	
  ”2011-­‐02-­‐28"	
  .	
  
}	
  
SPARQL:	
  Read	
  data	
  
SELECT	
  ?summary	
  ?uid	
  ?dtstart	
  ?dtend	
  
WHERE	
  {	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  rdf:type	
  ical:Vevent	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:uid	
  ?uid	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:summary	
  ?summary	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:dtstart	
  ?dtstart	
  .	
  
	
  	
  OPTIONAL	
  {	
  	
  
	
  	
  	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:dtend	
  ?dtend	
  .	
  	
  
	
  	
  }	
  
}	
  
SPARQL:	
  Update	
  data	
  
DELETE	
  {	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ?p	
  ?o	
  .	
  
}	
  
	
  
INSERT	
  INTO	
  <http://keg.vse.cz/>	
  {	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  rdf:type	
  ical:Vevent	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:uid	
  ”1"	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:summary	
  ”4IZ440"	
  .	
  
	
  	
  <http://keg.vse.cz/resource/event/1>	
  ical:dtstart	
  ”2011-­‐02-­‐28"	
  .	
  
}	
  
References	
  
§  hLp://dsic.zapisky.info/RDF/FOAF/parsingWithPHP/	
  
§  hLp://zapisky.info/?item=zverejnime-­‐akademicke-­‐projekty-­‐
    samozrejme-­‐semanDcky	
  

§  BOOK	
  –	
  John	
  Hebeler	
  (Author),	
  MaLhew	
  Fisher	
  (Author),	
  Ryan	
  
    Blace	
  (Author),	
  Andrew	
  Perez-­‐Lopez	
  (Author),	
  Mike	
  Dean	
  
    (Foreword):	
  Seman4c	
  Web	
  Programming,	
  Wiley,	
  2009	
  
QuesDons?	
  
Thank	
  you	
  

Mais conteúdo relacionado

Mais procurados

Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialAdonisDamian
 
The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)Myungjin Lee
 
The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)Myungjin Lee
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataFabien Gandon
 
FedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked DataFedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked Dataaschwarte
 
Programming with LOD
Programming with LODProgramming with LOD
Programming with LODFumihiro Kato
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesJose Emilio Labra Gayo
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLEmanuele Della Valle
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsRinke Hoekstra
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsDr. Neil Brittliff
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked DataGabriela Agustini
 

Mais procurados (20)

SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF
 
Semantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorialSemantic web meetup – sparql tutorial
Semantic web meetup – sparql tutorial
 
The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)The Semantic Web #4 - RDF (1)
The Semantic Web #4 - RDF (1)
 
Ontologies in RDF-S/OWL
Ontologies in RDF-S/OWLOntologies in RDF-S/OWL
Ontologies in RDF-S/OWL
 
The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)The Semantic Web #5 - RDF (2)
The Semantic Web #5 - RDF (2)
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked DataAn introduction to Semantic Web and Linked Data
An introduction to Semantic Web and Linked Data
 
FedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked DataFedX - Optimization Techniques for Federated Query Processing on Linked Data
FedX - Optimization Techniques for Federated Query Processing on Linked Data
 
Name That Graph !
Name That Graph !Name That Graph !
Name That Graph !
 
Programming with LOD
Programming with LODProgramming with LOD
Programming with LOD
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
Validating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectivesValidating RDF data: Challenges and perspectives
Validating RDF data: Challenges and perspectives
 
ShEx by Example
ShEx by ExampleShEx by Example
ShEx by Example
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n Bolts
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
An introduction to Semantic Web and Linked Data
An introduction to Semantic  Web and Linked DataAn introduction to Semantic  Web and Linked Data
An introduction to Semantic Web and Linked Data
 

Destaque

Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 
Semantic Technology Solutions For Recovery Gov And Data Gov With Transparenc...
Semantic Technology Solutions For Recovery Gov And  Data Gov With Transparenc...Semantic Technology Solutions For Recovery Gov And  Data Gov With Transparenc...
Semantic Technology Solutions For Recovery Gov And Data Gov With Transparenc...Mills Davis
 
Semantic Web 2.0: Creating Social Semantic Information Spaces
Semantic Web 2.0: Creating Social Semantic Information SpacesSemantic Web 2.0: Creating Social Semantic Information Spaces
Semantic Web 2.0: Creating Social Semantic Information SpacesJohn Breslin
 
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013Fabien Gandon
 
Intro to the Semantic Web Landscape - 2011
Intro to the Semantic Web Landscape - 2011Intro to the Semantic Web Landscape - 2011
Intro to the Semantic Web Landscape - 2011LeeFeigenbaum
 
Introduction To The Semantic Web
Introduction To The Semantic  WebIntroduction To The Semantic  Web
Introduction To The Semantic Webguest262aaa
 
Semantic Web Landscape 2009
Semantic Web Landscape 2009Semantic Web Landscape 2009
Semantic Web Landscape 2009LeeFeigenbaum
 
The Semantic Web
The Semantic WebThe Semantic Web
The Semantic Webostephens
 
Introduction to the Semantic Web
Introduction to the Semantic WebIntroduction to the Semantic Web
Introduction to the Semantic WebTomek Pluskiewicz
 
Introduction to the Semantic Web
Introduction to the Semantic WebIntroduction to the Semantic Web
Introduction to the Semantic WebMarin Dimitrov
 
Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Graeme Wood
 
Web 3.0 The Semantic Web
Web 3.0 The Semantic WebWeb 3.0 The Semantic Web
Web 3.0 The Semantic WebHatem Mahmoud
 
Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Semanticsoftware
 
Introduction to Semantic Computing
Introduction to Semantic ComputingIntroduction to Semantic Computing
Introduction to Semantic ComputingSemanticsoftware
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShareSlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShareSlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksSlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShareSlideShare
 

Destaque (19)

Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
Semantic Technology Solutions For Recovery Gov And Data Gov With Transparenc...
Semantic Technology Solutions For Recovery Gov And  Data Gov With Transparenc...Semantic Technology Solutions For Recovery Gov And  Data Gov With Transparenc...
Semantic Technology Solutions For Recovery Gov And Data Gov With Transparenc...
 
The Web of Data: The W3C Semantic Web Initiative
The Web of Data: The W3C Semantic Web InitiativeThe Web of Data: The W3C Semantic Web Initiative
The Web of Data: The W3C Semantic Web Initiative
 
Semantic Web 2.0: Creating Social Semantic Information Spaces
Semantic Web 2.0: Creating Social Semantic Information SpacesSemantic Web 2.0: Creating Social Semantic Information Spaces
Semantic Web 2.0: Creating Social Semantic Information Spaces
 
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013W3C Tutorial on Semantic Web and Linked Data at WWW 2013
W3C Tutorial on Semantic Web and Linked Data at WWW 2013
 
Intro to the Semantic Web Landscape - 2011
Intro to the Semantic Web Landscape - 2011Intro to the Semantic Web Landscape - 2011
Intro to the Semantic Web Landscape - 2011
 
Introduction To The Semantic Web
Introduction To The Semantic  WebIntroduction To The Semantic  Web
Introduction To The Semantic Web
 
Semantic Web Landscape 2009
Semantic Web Landscape 2009Semantic Web Landscape 2009
Semantic Web Landscape 2009
 
The Semantic Web
The Semantic WebThe Semantic Web
The Semantic Web
 
Introduction to the Semantic Web
Introduction to the Semantic WebIntroduction to the Semantic Web
Introduction to the Semantic Web
 
Introduction to the Semantic Web
Introduction to the Semantic WebIntroduction to the Semantic Web
Introduction to the Semantic Web
 
Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Semantic Computing Executive Briefing
Semantic Computing Executive Briefing
 
Web 3.0 The Semantic Web
Web 3.0 The Semantic WebWeb 3.0 The Semantic Web
Web 3.0 The Semantic Web
 
Semantic Computing Executive Briefing
Semantic Computing Executive Briefing Semantic Computing Executive Briefing
Semantic Computing Executive Briefing
 
Introduction to Semantic Computing
Introduction to Semantic ComputingIntroduction to Semantic Computing
Introduction to Semantic Computing
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Semelhante a 2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs

Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introductionGraphity
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2Dimitris Kontokostas
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLDaniel D.J. UM
 
Ruby semweb 2011-12-06
Ruby semweb 2011-12-06Ruby semweb 2011-12-06
Ruby semweb 2011-12-06Gregg Kellogg
 
RDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaRDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaPlatypus
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and SemanticsTatiana Al-Chueyr
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebShamod Lacoul
 
RDFa: an introduction
RDFa: an introductionRDFa: an introduction
RDFa: an introductionKai Li
 
2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDFandyseaborne
 
Chapter 3 semantic web
Chapter 3 semantic webChapter 3 semantic web
Chapter 3 semantic webR A Akerkar
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-descriptionSTIinnsbruck
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge queryStanley Wang
 
Semantic Web
Semantic WebSemantic Web
Semantic Webhardchiu
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the webshellac
 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeDan Brickley
 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFdonaldlsmithjr
 

Semelhante a 2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs (20)

Semantic Web introduction
Semantic Web introductionSemantic Web introduction
Semantic Web introduction
 
Graph databases & data integration v2
Graph databases & data integration v2Graph databases & data integration v2
Graph databases & data integration v2
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQL
 
Ruby semweb 2011-12-06
Ruby semweb 2011-12-06Ruby semweb 2011-12-06
Ruby semweb 2011-12-06
 
RDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFaRDFa Introductory Course Session 2/4 How RDFa
RDFa Introductory Course Session 2/4 How RDFa
 
How RDFa works
How RDFa worksHow RDFa works
How RDFa works
 
Linking the world with Python and Semantics
Linking the world with Python and SemanticsLinking the world with Python and Semantics
Linking the world with Python and Semantics
 
RDFa Tutorial
RDFa TutorialRDFa Tutorial
RDFa Tutorial
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic Web
 
RDFa: an introduction
RDFa: an introductionRDFa: an introduction
RDFa: an introduction
 
2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF2016-02 Graphs - PG+RDF
2016-02 Graphs - PG+RDF
 
Chapter 3 semantic web
Chapter 3 semantic webChapter 3 semantic web
Chapter 3 semantic web
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
 
Sparql a simple knowledge query
Sparql  a simple knowledge querySparql  a simple knowledge query
Sparql a simple knowledge query
 
RDFa
RDFaRDFa
RDFa
 
Semantic Web
Semantic WebSemantic Web
Semantic Web
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the web
 
SemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in PracticeSemWeb Fundamentals - Info Linking & Layering in Practice
SemWeb Fundamentals - Info Linking & Layering in Practice
 
Ontologias - RDF
Ontologias - RDFOntologias - RDF
Ontologias - RDF
 
Creating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDFCreating Web APIs with JSON-LD and RDF
Creating Web APIs with JSON-LD and RDF
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs

  • 1. The  Seman)c  Web   RDF,  SPARQL  and  so0ware   APIs   4IZ440  Knowledge  Representa4on  and  Reasoning  on  the  WWW   Josef  Petrák  |  me@jspetrak.name    
  • 2. Worth  a  note   §  Open  Data  iniDave  around  world  and  Europe  open  staDsDcal  and   government  data,  usually  in  RDF  format.   §  It  has  several  success  stories   §  hLp://headtoweb.posterous.com/open-­‐data-­‐success-­‐stories   §  Google  is  integraDng  RDF  encoded  as  RDFa  in  pages  into  its  search   results.   §  UEP  is  not  behind  –  DIKE  research  group  KEG  started  Czech–Slovak   semanDc  iniDaDve  called  SemanDcs   §  And  we  have  a  RDF-­‐based  website  deployed,  see   hLp://keg.vse.cz/  
  • 3. Outline   §  RDF  representaDon  formats   §  Data  handling  approaches   §  So0ware  APIs  overview   §  Approaches  in  examples   §  MoDvaDon  example:  web  applicaDon  
  • 5. Syntaxes   §  RDF  has  several  syntaxes.   §  A  “graph”  is  the  reference  syntax.   §  The  W3C  endorsed  file  format  is  RDF/XML   §  Other  file  formats:   §  N-­‐Triples   §  N3   §  RDF/JSON   §  RDFa  
  • 6. RDF  graph     rdf:type   gd:Person   gd:name   John  Example   gd:affiliaDon   Sample  Corp.  Inc.   PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX gd: <http://rdf.data-vocabulary.org/#>
  • 7. RDF/XML   <rdf:RDF      xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”      xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>      <rdf:Resource>          <rdf:type  rdf:resource=“http://rdf.data-­‐vocabulary.org/#Person”/>          <gd:name>John  Example</gd:name>          <gd:affiliation>Sample  Corp.  Inc.</gd:affiliation>      </rdf:Resource>   </rdf:RDF>  
  • 8. RDF/XML  (shortened)   <rdf:RDF      xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”      xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>      <gd:Person>          <gd:name>John  Example</gd:name>          <gd:affiliation>Sample  Corp.  Inc.</gd:affiliation>      </gd:Person>   </rdf:RDF>  
  • 9. N3  NotaDon   @prefix  gd:  <http://rdf.data-­‐vocabulary.org/#>  .     []  a  gd:Person;      gd:name  “John  Example”;      gd:affiliation  “Sample  Corp.  Inc.”  .  
  • 10. N–Triples   _:a  <http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#type>      <http://rdf.data-­‐vocabulary.org/#Person>  .   _:a  <http://rdf.data-­‐vocabulary.org/#name>      “John  Example”  .   _:a  <http://rdf.data-­‐vocabulary.org/#affiliation>      “Sample  Corp.  Inc.”  .   §  Primarily  used  to  defined  RDF  test  cases   §  Subset  of  N3  NotaDon  
  • 11. RDF/JSON   {      “_:a“  :  {          “http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”  :  [              {                  “value“  :  “http://rdf.data-­‐vocabulary.org/#Person”,  “type“  :  “uri“              }          ],          “http://rdf.data-­‐vocabulary.org/#name”  :  [              {                  “value“  :  “John  Example“,  “type“  :  “literal“              }          ],          “http://rdf.data-­‐vocabulary.org/#affiliation”  :  [              {                  “value“  :  “Sample  Corp.  Inc.“,  “type“  :  “literal“              }          ]      }   }  
  • 12. RDFa   <html      xmlns=“http://www.w3.org/1999/xhtml”      xmlns:rdf=“http://www.w3.org/1999/02/22-­‐rdf-­‐syntax-­‐ns#”      xmlns:gd=“http://rdf.data-­‐vocabulary.org/#”>     <p  typeof=“gd:Person”>      <em  property=“gd:name”>John  Example</em>  is  working        at  <em  property=“gd:affiliation”>Sample  Corp.  Inc.</em>.   </p>     </html>  
  • 13. Resources  about  RDF  formats   §  RDF/XML   §  hLp://www.w3.org/TR/rdf-­‐syntax-­‐grammar/   §  N3  NotaDon   §  hLp://www.w3.org/DesignIssues/NotaDon3   §  hLp://www.w3.org/2000/10/swap/Primer   §  N–Triples   §  hLp://www.w3.org/TR/rdf-­‐testcases/#ntriples   §  RDF/JSON   §  hLp://n2.talis.com/wiki/RDF_JSON_SpecificaDon   §  RDFa   §  hLp://www.w3.org/TR/rdfa-­‐syntax/  
  • 14. Task  #1   1.  Use  Google  Data  Vocabulary   §  hLp://www.data-­‐vocabulary.org/Person/   2.  Created  a  NotaDon3  file  with  demo  data  about  people  
  • 16. RDF  models   §  Statement–centric   §  Working  with  triples  of  ?subject  ?predicate  ?object   §  Resource–centric   §  Working  with  resources  having  properDes  and  their  values   §  Ontology–centric   §  Working  with  classes,  properDes,  and  individuals  as  defined  in  selected   vocabulary/schema/ontology   §  Named  graph   §  Triples  belongs  to  a  graph  with  URI  name   §  Working  with  quads  of  ?graph  ?subject  ?predicate  ?object  
  • 18. Java   §  Jena   §  hLp://openjena.org/   §  hLp://sourceforge.net/projects/jena/   §  Sesame   §  hLp://www.openrdf.org/   §  Shellac  RDFa  Parser   §  hLps://github.com/shellac/java-­‐rdfa  
  • 19. PHP   §  RDF  API  for  PHP  (RAP)   §  hLp://www4.wiwiss.fu-­‐berlin.de/bizer/rdfapi/   §  hLp://sourceforge.net/projects/rdfapi-­‐php/   §  ARC2   §  hLp://arc.semsol.org/  
  • 20. Ruby   §  RDF.rb   §  hLp://rdf.rubyforge.org/   §  hLps://github.com/bendiken/rdf   §  Plus  various  modules  
  • 22. File-­‐read   §  Task:  Read  RDF  data  from  a  NotaDon3  file  format  into  memory   model.  
  • 23. Read  N3  (Jena)   InputStream  is  =        FileManager.get().open("samples/people.n3");                     Model  model  =  ModelFactory.createDefaultModel();   RDFReader  r  =  model.getReader("N3");   r.read(model,  is,  null);   is.close();  
  • 24. Read  N3  (RDF.rb)   repository  =  RDF::Repository.new     RDF::N3::Reader.open(‘samples/people.n3’)  {  |reader|      repository  <<    reader   }  
  • 25. Read  N3  (ARC2)   $parser  =  ARC2::getRDFParser();   $parser-­‐>parse(‘samples/people.n3');       $triples  =  $parser-­‐>getTriples();  
  • 26. Read  N3  (RAP)   $model  =  ModelFactory::getDefaultModel();   $model-­‐>load('samples/people.n3');   §  This  code  won’t  run,  because  there  is  N3Reader  bug.   §  Works  also  for  RDF/XML  and  N–Triples  formats.  
  • 27. Traverse  triples   §  Task:  Take  a  memory  model  and  list  all  or  parDcular  RDF  triples.  
  • 28. Traverse  triples  (Jena)   Model  model  =  ModelFactory.createDefaultModel();   //  Load  data  into  model                 StmtIterator  i  =  model.listStatements();   while  (i.hasNext())  {      Statement  stmt  =  i.nextStatement();      Resource  subject  =  stmt.getSubject();      Property  predicate  =  stmt.getPredicate();      RDFNode  object  =  stmt.getObject();                                //  Printing  out   }  
  • 29. Query  Model  (Jena)   Resource  rPerson  =  model.getResource("http://rdf.data-­‐ vocabulary.org/#Person");   Property  rName  =  model.getProperty("http://rdf.data-­‐vocabulary.org/ #name");     StmtIterator  si  =  model.listStatements(null,  RDF.type,  rPerson);   while  (si.hasNext())  {      Resource  r  =  si.nextStatement().getSubject();      StmtIterator  sii  =  model.listStatements(r,  rName,  (RDFNode)null);      if  (sii.hasNext())  {          System.out.println(sii.nextStatement().getObject().toString());      }   }  
  • 30. Traverse  triples  (RDF.rb)   repository  =  RDF::Repository.new   #  Load  data     repository.each_statement  {  |statement|      puts  statement   }  
  • 31. Query  model  (RDF.rb)   GD  =  RDF::Vocabulary.new('http://rdf.data-­‐vocabulary.org/#')     repository  =  RDF::Repository.new   #  Load  data     query  =  RDF::Query.new({      :person  =>  {          RDF.type  =>  GD.Person,  GD.name  =>  :name      }   })     query.execute(graph).each  do  |person|      puts  "name=#{person.name}"   end  
  • 32. Query  SPARQL  Endpoint   §  Task:  Query  a  SPARQL  endpoint  and  write  out  the  data.  E.g.  from   DBPedia,  write  one  random  blackboard  gag  wriLen  by  Bart   Simpson.  
  • 33. Query  SPARQL  Endpoint  (Jena)   String  qa  =  "PREFIX  skos:  <http://www.w3.org/2004/02/skos/core#>"                                  +  "PREFIX  dbpprop:  <http://dbpedia.org/property/>"                                  +  "PREFIX  dcterms:  <http://purl.org/dc/terms/>"                                  +  "PREFIX  rdfs:  <http://www.w3.org/2000/01/rdf-­‐schema#>"                                  +  "SELECT  ?gag  WHERE  {  "                                  +  "?series  skos:broader  <http://dbpedia.org/resource/ Category:The_Simpsons_episodes>  ."                                  +  "    ?episode  dcterms:subject  ?series  ."                                  +  "    ?episode  dbpprop:blackboard  ?gag  ."                                  +  "}"                                  +  "LIMIT  1000";   Query  q  =  QueryFactory.create(qa);                   QueryExecution  qe  =        QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql",  q);   ResultSet  rs  =  qe.execSelect();   ResultSetFormatter.out(System.out,  rs,  q);   qe.close();  
  • 34. Query  SPARQL  Endpoint  (RDF.rb)   sparql  =        SPARQL::Client.new("http://dbpedia.org/sparql")     result  =  sparql.query("SELECT  ?gag  WHERE  {        ?series  skos:broader  <http://dbpedia.org/resource/ Category:The_Simpsons_episodes>  .      ?episode  dcterms:subject  ?series  .      ?episode  dbpprop:blackboard  ?gag  .   }   LIMIT  1000")     puts  result[rand(result.length)][:gag]  
  • 35. Query  SPARQL  Endpoint  (RAP)   $client  =        ModelFactory::getSparqlClient("http://www.exampleSparqlService.net:2020/ example");     $query  =  new  ClientQuery();   $query-­‐>query(‘PREFIX  skos:  <http://www.w3.org/2004/02/skos/core#>    PREFIX  dbpprop:  <http://dbpedia.org/property/>    PREFIX  dcterms:  <http://purl.org/dc/terms/>    PREFIX  rdfs:  <http://www.w3.org/2000/01/rdf-­‐schema#>    SELECT  ?gag  WHERE  {        ?series  skos:broader  <http://dbpedia.org/resource/ Category:The_Simpsons_episodes>  .        ?episode  dcterms:subject  ?series  .        ?episode  dbpprop:blackboard  ?gag  .    }  LIMIT  1000’);   $result  =  $client-­‐>query($query);     foreach($result  as  $line){  echo($line['?gag']-­‐>toString());  }  
  • 36. Query  SPARQL  Endpoint  (ARC2)   $store  =        ARC2::getRemoteStore(          array('remote_store_endpoint'  =>  'http://dbpedia.org/sparql'));     $q  =  ‘PREFIX  skos:  <http://www.w3.org/2004/02/skos/core#>    PREFIX  dbpprop:  <http://dbpedia.org/property/>    PREFIX  dcterms:  <http://purl.org/dc/terms/>    PREFIX  rdfs:  <http://www.w3.org/2000/01/rdf-­‐schema#>    SELECT  ?gag  WHERE  {        ?series  skos:broader  <http://dbpedia.org/resource/ Category:The_Simpsons_episodes>  .        ?episode  dcterms:subject  ?series  .        ?episode  dbpprop:blackboard  ?gag  .    }  LIMIT  1000’;     $rows  =  $store-­‐>query($q,  'rows');    
  • 37. Task  #2   1.  Select  one  of  frameworks  (preferably  Jena)   2.  Load  data  from  your  NotaDon3  file   3.  Write  out  names  and  work  Dtles  of  people  
  • 39. Knowledge  Engineering  Group   Website   §  hLp://keg.vse.cz/   §  RDF  outside   §  Data  dumps  in  RDF/XML   §  Web  pages  enriched  with  RDFa   §  RDF  inside   §  Data  created  by  SPARQL  INSERT   §  Data  queried  by  SPARQL  SELECT   §  Data  updated  by  SPARQL  DELETE  and  SELECT   §  Data  manipulated  by  user–friendly  forms   §  Ongoing:  data  integraDon  with  ISIS  VŠE  and  other  department   applicaDons  
  • 40. SPARQL:  Create  data   INSERT  INTO  <http://keg.vse.cz/>  {      <http://keg.vse.cz/resource/event/1>  rdf:type  ical:Vevent  .      <http://keg.vse.cz/resource/event/1>  ical:uid  ”1"  .      <http://keg.vse.cz/resource/event/1>  ical:summary  ”IZI440"  .      <http://keg.vse.cz/resource/event/1>  ical:dtstart  ”2011-­‐02-­‐28"  .   }  
  • 41. SPARQL:  Read  data   SELECT  ?summary  ?uid  ?dtstart  ?dtend   WHERE  {      <http://keg.vse.cz/resource/event/1>  rdf:type  ical:Vevent  .      <http://keg.vse.cz/resource/event/1>  ical:uid  ?uid  .      <http://keg.vse.cz/resource/event/1>  ical:summary  ?summary  .      <http://keg.vse.cz/resource/event/1>  ical:dtstart  ?dtstart  .      OPTIONAL  {            <http://keg.vse.cz/resource/event/1>  ical:dtend  ?dtend  .        }   }  
  • 42. SPARQL:  Update  data   DELETE  {      <http://keg.vse.cz/resource/event/1>  ?p  ?o  .   }     INSERT  INTO  <http://keg.vse.cz/>  {      <http://keg.vse.cz/resource/event/1>  rdf:type  ical:Vevent  .      <http://keg.vse.cz/resource/event/1>  ical:uid  ”1"  .      <http://keg.vse.cz/resource/event/1>  ical:summary  ”4IZ440"  .      <http://keg.vse.cz/resource/event/1>  ical:dtstart  ”2011-­‐02-­‐28"  .   }  
  • 43. References   §  hLp://dsic.zapisky.info/RDF/FOAF/parsingWithPHP/   §  hLp://zapisky.info/?item=zverejnime-­‐akademicke-­‐projekty-­‐ samozrejme-­‐semanDcky   §  BOOK  –  John  Hebeler  (Author),  MaLhew  Fisher  (Author),  Ryan   Blace  (Author),  Andrew  Perez-­‐Lopez  (Author),  Mike  Dean   (Foreword):  Seman4c  Web  Programming,  Wiley,  2009