Semantic Web Applications dev8D 2009
About Me <ul><li>Julian Higman </li></ul><ul><li>Talis Information Ltd </li></ul><ul><li>Building semantic web application...
About this talk <ul><li>The Semantic Web and why it’s needed </li></ul><ul><li>Linked Open Data </li></ul><ul><li>Ontologi...
The Semantic Web <ul><li>Web of Data </li></ul><ul><ul><li>Machine readable </li></ul></ul><ul><ul><li>Structured, distrib...
Why it’s needed <ul><li>Linking silos of data </li></ul><ul><li>Social networks demonstrate problem </li></ul><ul><li>Quer...
Linked Open Data <ul><li>“ Best practice for exposing, sharing and connecting pieces of data, information and knowledge on...
Linked Open Data
Ontologies <ul><li>RDF </li></ul><ul><li>FOAF </li></ul><ul><li>SIOC </li></ul><ul><li>Bibliontology </li></ul><ul><li>Dub...
RDF <ul><li>Subject – Predicate – Object </li></ul><ul><li><http://talis.com/jhigman> <http://xmlns.com/foaf/0.1/name> “ju...
RDFXML <ul><li><rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; </li></ul><ul><li>xmlns:foaf=&qu...
SPARQL <ul><li>DESCRIBE <http://life.ac.uk/people/benstongeorgej>  </li></ul><ul><li>PREFIX aiiso: <http://purl.org/vocab/...
RDF Libraries <ul><li>ARC2 (PHP) </li></ul><ul><li>Jena (Java) </li></ul><ul><li>Python, Ruby, etc </li></ul>
What we’ve built <ul><li>Talis Aspire  </li></ul><ul><li>Resource list management  </li></ul><ul><li>Collect, organise, sh...
http://life.ac.uk/lists/abf203.html
http://life.ac.uk/items/abf203-1.html
http://life.ac.uk/items/abf203-1.rdf
http://life.ac.uk/items/abf203-1.json <ul><li>{ </li></ul><ul><li>&quot;http://life.ac.uk/resources/id3781&quot; : { </li>...
A closer look at the RDF <ul><li>xmlns:ns1=&quot;http://rdfs.org/sioc/spec/&quot; </li></ul><ul><li>xmlns:ns2=&quot;http:/...
Query the store <ul><li><?php </li></ul><ul><li>require_once ( '../src/data/sparql-functions.php' ); </li></ul><ul><li>$in...
Render HTML page <ul><li><?php </li></ul><ul><li>if  (resourceHasProperty($triples, $conceptUri, ONT_aiiso. 'description' ...
Render RDF page <ul><li><?php </li></ul><ul><li>header( 'Content-Type: application/rdf+xml; charset=UTF-8' ); </li></ul><u...
Hint and Tips <ul><li>Reuse existing ontologies </li></ul><ul><ul><li>essential </li></ul></ul><ul><li>Create and publish ...
Hints and Tips <ul><li>The data is not yours </li></ul><ul><ul><li>expect incomplete data </li></ul></ul><ul><ul><li>expec...
Hints and Tips <ul><li>URIs are Nouns not Verbs </li></ul><ul><ul><li>permalinks for resources </li></ul></ul><ul><li>HTTP...
Hints and Tips <ul><li>Writing data is more difficult than reading it </li></ul><ul><ul><li>If data is gathered from many ...
Hints and Tips <ul><li>Editing with RDFa  </li></ul><ul><ul><li>rdfQuery library (by Jeni Tennison) </li></ul></ul><ul><ul...
Hints and Tips <ul><li><ol class=&quot;list&quot; id=&quot;theList&quot; </li></ul><ul><li>xmlns:tenant=&quot;http://purl....
Getting Started <ul><li>Talis Platform triple store </li></ul><ul><ul><li>http://n2.talis.com/ </li></ul></ul><ul><li>Mori...
More <ul><li>dbpedia </li></ul><ul><li>Open Calais </li></ul><ul><li>Search Monkey </li></ul><ul><li>Twine </li></ul><ul><...
Upcoming SlideShare
Loading in...5
×

Semantic Web Applications

2,237

Published on

Lightning talks at dev8D, 11th Feb 2009. London UK.

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,237
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
52
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Semantic Web Applications

  1. 1. Semantic Web Applications dev8D 2009
  2. 2. About Me <ul><li>Julian Higman </li></ul><ul><li>Talis Information Ltd </li></ul><ul><li>Building semantic web applications for libraries and educational institutions </li></ul><ul><li>[email_address] </li></ul><ul><li>http://julianhigman.com/blog </li></ul>
  3. 3. About this talk <ul><li>The Semantic Web and why it’s needed </li></ul><ul><li>Linked Open Data </li></ul><ul><li>Ontologies, RDF and Sparql </li></ul><ul><li>What we’ve built and how we built it </li></ul><ul><li>Hints and Tips </li></ul><ul><li>More info </li></ul>
  4. 4. The Semantic Web <ul><li>Web of Data </li></ul><ul><ul><li>Machine readable </li></ul></ul><ul><ul><li>Structured, distributed, linked </li></ul></ul><ul><li>Co-exists with web of documents </li></ul>
  5. 5. Why it’s needed <ul><li>Linking silos of data </li></ul><ul><li>Social networks demonstrate problem </li></ul><ul><li>Querying over combined sets of data </li></ul><ul><li>Data mashups </li></ul>
  6. 6. Linked Open Data <ul><li>“ Best practice for exposing, sharing and connecting pieces of data, information and knowledge on the Semantic Web using URIs and RDF” (Wikipedia) </li></ul><ul><ul><li>Identify resources with unique URIs </li></ul></ul><ul><ul><li>Make URIs dereferenceable </li></ul></ul><ul><ul><li>Link to other data sets </li></ul></ul>
  7. 7. Linked Open Data
  8. 8. Ontologies <ul><li>RDF </li></ul><ul><li>FOAF </li></ul><ul><li>SIOC </li></ul><ul><li>Bibliontology </li></ul><ul><li>Dublin Core </li></ul><ul><li>SKOS </li></ul><ul><li>AIISO </li></ul>
  9. 9. RDF <ul><li>Subject – Predicate – Object </li></ul><ul><li><http://talis.com/jhigman> <http://xmlns.com/foaf/0.1/name> “julian” </li></ul><ul><li>Several representations </li></ul><ul><ul><li>RDX/XML </li></ul></ul><ul><ul><li>Turtle </li></ul></ul><ul><ul><li>N3 </li></ul></ul>
  10. 10. RDFXML <ul><li><rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; </li></ul><ul><li>xmlns:foaf=&quot;http://xmlns.com/foaf/0.1/&quot;> </li></ul><ul><li><rdf:Description rdf:about=&quot;http://life.ac.uk/people/benstongeorgej&quot;> </li></ul><ul><li><rdf:type rdf:resource=&quot;http://xmlns.com/foaf/0.1/Person&quot;/> </li></ul><ul><li><foaf:name>Benston, George J.</foaf:name> </li></ul><ul><li></rdf:Description> </li></ul><ul><li></rdf:RDF> </li></ul>
  11. 11. SPARQL <ul><li>DESCRIBE <http://life.ac.uk/people/benstongeorgej> </li></ul><ul><li>PREFIX aiiso: <http://purl.org/vocab/aiiso/schema#> </li></ul><ul><li>DESCRIBE <$institution> ?s </li></ul><ul><li>WHERE { <$institution> aiiso:organisationalUnit ?s } </li></ul>
  12. 12. RDF Libraries <ul><li>ARC2 (PHP) </li></ul><ul><li>Jena (Java) </li></ul><ul><li>Python, Ruby, etc </li></ul>
  13. 13. What we’ve built <ul><li>Talis Aspire </li></ul><ul><li>Resource list management </li></ul><ul><li>Collect, organise, share course reading materials </li></ul><ul><li>http:// blogs.talis.com /aspire/ </li></ul>
  14. 14. http://life.ac.uk/lists/abf203.html
  15. 15. http://life.ac.uk/items/abf203-1.html
  16. 16. http://life.ac.uk/items/abf203-1.rdf
  17. 17. http://life.ac.uk/items/abf203-1.json <ul><li>{ </li></ul><ul><li>&quot;http://life.ac.uk/resources/id3781&quot; : { </li></ul><ul><li>&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&quot; : [ </li></ul><ul><li>{ &quot;value&quot; : &quot;http://purl.org/ontology/bibo/WebPage&quot;, &quot;type&quot; : &quot;uri&quot; } </li></ul><ul><li>], </li></ul><ul><li>&quot;http://purl.org/vocab/resourcelist/schema#list&quot; : [ </li></ul><ul><li>{ &quot;value&quot; : &quot;http://life.ac.uk/lists/abf203&quot;, &quot;type&quot; : &quot;uri&quot; } </li></ul><ul><li>], </li></ul><ul><li>&quot;http://purl.org/ontology/bibo/uri&quot; : [ </li></ul><ul><li>{ &quot;value&quot; : &quot;http://www.google.co.uk/products?q=Elliott+and+Elliott+Financial+reporting+and+accounting+12th+edition&hl=en&cr=countryUK%7CcountryGB&um=1&sa=X&oi=froogle&ct=title&quot;, &quot;type&quot; : &quot;uri&quot; } </li></ul><ul><li>], </li></ul><ul><li>&quot;http://purl.org/dc/terms/title&quot; : [ </li></ul><ul><li>{ &quot;value&quot; : &quot;Elliott and Elliott Financial reporting and accounting 12th edition - Google Product Search&quot;, &quot;type&quot; : &quot;literal&quot; } </li></ul><ul><li>] </li></ul><ul><li>}, </li></ul>
  18. 18. A closer look at the RDF <ul><li>xmlns:ns1=&quot;http://rdfs.org/sioc/spec/&quot; </li></ul><ul><li>xmlns:ns2=&quot;http://purl.org/vocab/resourcelist/schema#&quot; </li></ul><ul><li>xmlns:ns3=&quot;http://purl.org/vocab/lifecycle/schema#&quot; </li></ul><ul><li>xmlns:ns4=&quot;http://purl.org/dc/terms/&quot; </li></ul><ul><li>xmlns:ns5=&quot;http://purl.org/ontology/bibo/&quot; </li></ul><ul><li><rdf:Description rdf:about=&quot;http://life.ac.uk/items/abf203-46&quot;> </li></ul><ul><li><ns2:resource rdf:resource=&quot;http://life.ac.uk/resources/id3787&quot;/> </li></ul><ul><li><ns1:note>This the most recent edition</ns1:note> </li></ul><ul><li><ns3:state rdf:resource=&quot;http://purl.org/vocab/resourcelist/schema#status-published&quot;/> </li></ul><ul><li><ns1:has_container rdf:resource=&quot;http://life.ac.uk/sections/abf203-9&quot;/> </li></ul><ul><li><ns2:list rdf:resource=&quot;http://life.ac.uk/lists/abf203&quot;/> </li></ul><ul><li><rdf:type rdf:resource=&quot;http://purl.org/vocab/resourcelist/schema#Item&quot;/> </li></ul><ul><li></rdf:Description> </li></ul><ul><li><rdf:Description rdf:about=&quot;http://life.ac.uk/resources/id3787&quot;> </li></ul><ul><li><ns2:list rdf:resource=&quot;http://life.ac.uk/lists/abf203&quot;/> </li></ul><ul><li><ns4:title>Elliott and Elliott Financial reporting and accounting 12th edition</ns4:title> </li></ul><ul><li><ns5:uri rdf:resource=&quot;http://www.google.co.uk/products?q=Elliott+and+Elliott&quot;/> </li></ul><ul><li><rdf:type rdf:resource=&quot;http://purl.org/ontology/bibo/WebPage&quot;/> </li></ul><ul><li></rdf:Description> </li></ul>
  19. 19. Query the store <ul><li><?php </li></ul><ul><li>require_once ( '../src/data/sparql-functions.php' ); </li></ul><ul><li>$institution = $conceptUri; </li></ul><ul><li>$query = &quot;PREFIX aiiso: <http://purl.org/vocab/aiiso/schema#> </li></ul><ul><li>DESCRIBE <$institution> ?s WHERE { <$institution> aiiso:organisationalUnit ?s }&quot;; </li></ul><ul><li>$rdfxml = query_store_xml($tenant->listStore, $query); </li></ul><ul><li>$triples = parse_to_triples_array($rdfxml); </li></ul><ul><li>?> </li></ul>
  20. 20. Render HTML page <ul><li><?php </li></ul><ul><li>if (resourceHasProperty($triples, $conceptUri, ONT_aiiso. 'description' )) </li></ul><ul><li>{ </li></ul><ul><li>echo '<p id=&quot;Description&quot;>' . getFirstValue($triples, $conceptUri, ONT_aiiso. 'description' ) . '</p>' ; </li></ul><ul><li>} </li></ul><ul><li>if (resourceHasProperty($triples, $conceptUri, ONT_resource. 'usesList' )) </li></ul><ul><li>{ </li></ul><ul><li>echo '<h2 id=&quot;Lists-header&quot;>Lists</h2>' ; </li></ul><ul><li>echo '<ul id=&quot;lists&quot;>' ; </li></ul><ul><li>foreach ($triples[&quot;$conceptUri&quot;][ONT_resource. 'usesList' ] as $list) </li></ul><ul><li>{ </li></ul><ul><li>$name = $triples[$list[ 'value' ]][ONT_sioc. 'name' ][0][ 'value' ]; </li></ul><ul><li>echo “<li class=&quot;List&quot;><a href=&quot;{$list['value']}“ title=&quot;&quot;.trim($name).&quot;&quot;>{$name}</a></li>&quot;; </li></ul><ul><li>} </li></ul><ul><li>echo '</ul>' ; </li></ul><ul><li>} </li></ul><ul><li>?> </li></ul>
  21. 21. Render RDF page <ul><li><?php </li></ul><ul><li>header( 'Content-Type: application/rdf+xml; charset=UTF-8' ); </li></ul><ul><li>echo $rdfxml; </li></ul><ul><li>?> </li></ul>
  22. 22. Hint and Tips <ul><li>Reuse existing ontologies </li></ul><ul><ul><li>essential </li></ul></ul><ul><li>Create and publish an ontology </li></ul><ul><ul><li>but only if you need to </li></ul></ul><ul><li>Include links to other ontologies </li></ul><ul><ul><li>owl:sameAs </li></ul></ul>
  23. 23. Hints and Tips <ul><li>The data is not yours </li></ul><ul><ul><li>expect incomplete data </li></ul></ul><ul><ul><li>expect extra data </li></ul></ul><ul><ul><li>expect multiple values </li></ul></ul><ul><li>Avoid strong typing </li></ul><ul><ul><li>#ResourceList can also be #Seq </li></ul></ul>
  24. 24. Hints and Tips <ul><li>URIs are Nouns not Verbs </li></ul><ul><ul><li>permalinks for resources </li></ul></ul><ul><li>HTTP methods </li></ul><ul><ul><li>GET, POST, PUT, DEL </li></ul></ul><ul><li>Use HTTP codes </li></ul><ul><ul><li>404 if resource not found </li></ul></ul><ul><ul><li>303 (See Also) to redirect </li></ul></ul><ul><ul><li>405 Method Not Allowed </li></ul></ul><ul><ul><li>etc </li></ul></ul>
  25. 25. Hints and Tips <ul><li>Writing data is more difficult than reading it </li></ul><ul><ul><li>If data is gathered from many sources, who owns the triples? </li></ul></ul><ul><ul><li>How do you indicate which triples are to be replaced and which are to be added? </li></ul></ul><ul><li>SPARQL Update, Changesets </li></ul>
  26. 26. Hints and Tips <ul><li>Editing with RDFa </li></ul><ul><ul><li>rdfQuery library (by Jeni Tennison) </li></ul></ul><ul><ul><li>Markup html with RDFa </li></ul></ul><ul><ul><li>Edit elements in the browser </li></ul></ul><ul><ul><li>Extract new RDF model </li></ul></ul><ul><ul><li>Post new model to server </li></ul></ul>
  27. 27. Hints and Tips <ul><li><ol class=&quot;list&quot; id=&quot;theList&quot; </li></ul><ul><li>xmlns:tenant=&quot;http://purl.org/ontology/tenant/1.0/&quot; </li></ul><ul><li>xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; </li></ul><ul><li>xmlns:sioc=&quot;http://rdfs.org/sioc/spec/&quot; </li></ul><ul><li>xmlns:resource=&quot;http://purl.org/vocab/resourcelist/schema#&quot; </li></ul><ul><li>xml:lang=&quot;en&quot; </li></ul><ul><li>about=&quot;[tenant:lists/abf203]&quot; </li></ul><ul><li>typeof=&quot;resource:List rdf:Seq&quot;> </li></ul><ul><li><li class=&quot;section&quot; id=&quot;section-abf203-1&quot; typeof=&quot;resource:Section rdf:Seq&quot; about=&quot;[tenant:sections/abf203-1]&quot;> </li></ul><ul><li><div class=&quot;sectionDetails&quot;> </li></ul><ul><li><span class=&quot;sequenceNumber&quot; rev=&quot;rdf:_1&quot; resource=&quot;[tenant:lists/abf203]&quot;></span> </li></ul><ul><li><span rev=&quot;resource:contains&quot; resource=&quot;[tenant:lists/abf203]&quot;></span> </li></ul><ul><li><span class=&quot;hasParent&quot; rel=&quot;sioc:has_parent&quot; resource=&quot;[tenant:lists/abf203]&quot;></span> </li></ul><ul><li><span class=&quot;name&quot; property=&quot;sioc:name&quot;>Recommended Text</span> </li></ul><ul><li><ol id=&quot;section-abf203-1-items&quot; class=&quot;sectionItems&quot;> </li></ul><ul><li><li class=&quot;item&quot; id=&quot;item-abf203-1&quot;> </li></ul><ul><li><div typeof=&quot;resource:Item&quot; about=&quot;[tenant:items/abf203-1]&quot;> </li></ul><ul><li><span rev=&quot;resource:contains&quot; resource=&quot;[tenant:lists/abf203]&quot;></span> </li></ul>
  28. 28. Getting Started <ul><li>Talis Platform triple store </li></ul><ul><ul><li>http://n2.talis.com/ </li></ul></ul><ul><li>Moriarty PHP platform access library </li></ul><ul><ul><li>http://code.google.com/p/moriarty/ </li></ul></ul>
  29. 29. More <ul><li>dbpedia </li></ul><ul><li>Open Calais </li></ul><ul><li>Search Monkey </li></ul><ul><li>Twine </li></ul><ul><li>Powerset </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×