Semantic Web Applications
Upcoming SlideShare
Loading in...5
×
 

Semantic Web Applications

on

  • 2,939 views

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

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

Statistics

Views

Total Views
2,939
Views on SlideShare
2,935
Embed Views
4

Actions

Likes
1
Downloads
49
Comments
0

1 Embed 4

http://www.slideshare.net 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Semantic Web Applications Semantic Web Applications Presentation Transcript

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