O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

SemanticWeb Nuts 'n Bolts

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 36 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a SemanticWeb Nuts 'n Bolts (20)

Anúncio

Mais de Rinke Hoekstra (20)

Mais recentes (20)

Anúncio

SemanticWeb Nuts 'n Bolts

  1. 1. SemanticWeb: Nuts ‘n Bolts Leibniz Center Meeting, November 2007 Rinke Hoekstra
  2. 2. Overview <ul><li>The Semantic Web </li></ul><ul><li>Identification </li></ul><ul><li>Languages and Integration </li></ul><ul><li>Storage and Querying </li></ul><ul><li>Browsing and Viewing </li></ul><ul><li>... does it really exist? </li></ul>
  3. 3. The Semantic Web adds... <ul><li>Machine understandable semantics </li></ul><ul><li>Explicit metadata </li></ul><ul><li>Ontology on the web: </li></ul><ul><ul><li>shared understanding of a domain </li></ul></ul><ul><li>Logic </li></ul><ul><ul><li>Explanation --> Confidence </li></ul></ul><ul><ul><li>Reasoning </li></ul></ul><ul><ul><ul><li>Expressiveness vs. Computational Efficiency </li></ul></ul></ul>
  4. 4. The Semantic Web Ideology <ul><li>Partial solutions are great too! </li></ul><ul><li>Layer cake </li></ul>OWL
  5. 5. Identification: URI’s and Namespaces <ul><li>URI: Universal Resource Identifier </li></ul><ul><ul><li>... Just an identifier </li></ul></ul><ul><ul><ul><li>http://www.leibnizcenter.org/people#joost </li></ul></ul></ul><ul><ul><li>URL: Universal Resource Location </li></ul></ul><ul><ul><ul><li>http://www.leibnizcenter.org/people#joost </li></ul></ul></ul><ul><ul><li>URN: Universal Resource Name </li></ul></ul><ul><ul><ul><li>urn:leibnizcenter:people:joost </li></ul></ul></ul><ul><ul><li>IRI: Internationalized Resource Identifier http://www.l èî ß ñ ¡zç é nt ë r.ørg/p é øple#jøøst </li></ul></ul><ul><li>Namespace </li></ul><ul><ul><li>A ‘space’ in which all locally defined names are unique, e.g.: </li></ul></ul><ul><ul><ul><li>http://www.leibnizcenter.org/people#joost </li></ul></ul></ul><ul><ul><ul><li>http://www.hcs.science.uva.nl/staff#joost </li></ul></ul></ul><ul><ul><li>Basis for `trust’ </li></ul></ul>
  6. 6. Languages: XML, XML Schema, XPath & XSLT <ul><li>Meta-language for markup </li></ul><ul><li>XML: Structured metadata </li></ul><ul><ul><li>Elements & attributes </li></ul></ul><ul><ul><li>Semantics through nesting </li></ul></ul><ul><ul><ul><li>Ordered labeled tree </li></ul></ul></ul><ul><ul><li>Constraints on values </li></ul></ul><ul><ul><li>Order of elements important </li></ul></ul><ul><li>XML Schema: Defines structure </li></ul><ul><ul><li>Types </li></ul></ul><ul><ul><li>Built-in datatypes </li></ul></ul><ul><li>XPath: Traverse structure </li></ul><ul><li>XSLT: Transform structure </li></ul>
  7. 7. Languages: RDF & RDF Schema <ul><li>RDF: Data-model </li></ul><ul><ul><li>Triples: object-attribute-value </li></ul></ul><ul><ul><li>Has an XML syntax, but also others (!) </li></ul></ul><ul><ul><ul><li>Semantics is independent of order of elements </li></ul></ul></ul><ul><ul><li>Independent of domain of use </li></ul></ul><ul><ul><li>Graph, not tree </li></ul></ul><ul><li>RDF(S): Defines vocabulary </li></ul><ul><ul><li>Introduces classes </li></ul></ul><ul><ul><li>Makes semantic information machine accessible </li></ul></ul>
  8. 8. Languages: RDF <ul><li>Resource </li></ul><ul><ul><li>‘ things’ on the web </li></ul></ul><ul><ul><li>Have a URI ( rdf:ID, rdf:about ) </li></ul></ul><ul><li>Literal </li></ul><ul><li>Property </li></ul><ul><ul><li>Also a resource </li></ul></ul><ul><ul><li>Describes relations </li></ul></ul><ul><li>Statement </li></ul><ul><ul><li>Also a resource </li></ul></ul><ul><ul><li>Triple: <resource,property,value> </li></ul></ul><ul><ul><li>Asserts the property of a resource </li></ul></ul><ul><li>Reification </li></ul><ul><ul><li>Statements about statements </li></ul></ul><ul><ul><li>Contrast: traditional meta-classes </li></ul></ul>
  9. 9. Languages: RDF Schema <ul><li>Distinction between individual objects & classes </li></ul><ul><ul><li>rdfs:Class , rdf:type </li></ul></ul><ul><li>Subclasses: </li></ul><ul><ul><li>rdfs:subClassOf </li></ul></ul><ul><ul><li>Subclass hierarchies </li></ul></ul><ul><ul><li>Inheritance of properties </li></ul></ul><ul><li>Global restrictions on properties </li></ul><ul><ul><li>rdf:domain and rdf:range </li></ul></ul><ul><li>Subproperties: </li></ul><ul><ul><li>rdfs:subPropertyOf </li></ul></ul><ul><li>Metadata </li></ul><ul><ul><li>rdfs:seeAlso , rdfs:isDefinedBy , rdfs:comment , rdfs:label </li></ul></ul>
  10. 10. Languages: RDF/XML Code Example <ul><li><?xml version=“1.0” encoding=“utf-8”?> </li></ul><ul><li><rdf:RDF </li></ul><ul><li>xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” </li></ul><ul><li>xmlns:uva=“http://www.uva.nl/rdf#” </li></ul><ul><li>xmlns=“http://www.uva.nl/people”> </li></ul><ul><li><rdf:Description rdf:about=“http://www.uva.nl/people#joost”> </li></ul><ul><li><uva:teaches rdf:resource=“http://www.uva.nl/courses#kr2007”/> </li></ul><ul><li></rdf:Description> </li></ul><ul><li><rdf:Description rdf:ID=“#joost”> </li></ul><ul><li><uva:name>Joost Breuker</uva:name> </li></ul><ul><li></rdf:Description> </li></ul><ul><li></rdf:RDF> </li></ul>
  11. 11. Languages: RDF(S)/XML Code Example. <ul><li><rdf:RDF </li></ul><ul><li>xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” </li></ul><ul><li>xmlns:rdfs=&quot;http://www.w3.org/TR/rdf-schema/&quot; </li></ul><ul><li>xmlns:uva=“http://www.uva.nl/rdf#” </li></ul><ul><li>xmlns=“http://www.uva.nl/people”> </li></ul><ul><li><rdf:Description rdf:ID=“#joost”> </li></ul><ul><li><rdf:type rdf:resource=“http://www.uva.nl/rdf#Professor”/> </li></ul><ul><li><uva:name>Joost Breuker</uva:name> </li></ul><ul><li><uva:teaches rdf:resource=“http://www.uva.nl/courses#kr2007”/> </li></ul><ul><li></rdf:Description> </li></ul><ul><li><uva:Course rdf:about=“http://www.uva.nl/courses#kr2007”/> </li></ul><ul><li><rdfs:Class rdf:about=“http://www.uva.nl/rdf#Professor”> </li></ul><ul><li><rdfs:subClassOf rdf:resource=“http://www.uva.nl/rdf#StaffMember”/> </li></ul><ul><li></rdfs:Class> </li></ul><ul><li><rdf:Property rdf:about=“http://www.uva.nl/rdf#teaches”> </li></ul><ul><li><rdfs:domain rdf:resource=“http://www.uva.nl/rdf#Professor”/> </li></ul><ul><li><rdfs:range rdf:resource=“http://www.uva.nl/rdf#Course”/> </li></ul><ul><li></rdf:Property> </li></ul><ul><li></rdf:RDF> </li></ul>
  12. 12. Languages: RDF notations <ul><li>Different ways of writing RDF </li></ul><ul><ul><li>RDF/XML </li></ul></ul><ul><ul><li>RDF/XML Abbrev </li></ul></ul><ul><ul><li>N3 </li></ul></ul><ul><ul><ul><li>Turtle only allows valid RDF-graphs </li></ul></ul></ul><ul><ul><ul><li>Ntriple one triple per line, fully qualified id’s. </li></ul></ul></ul>
  13. 13. Languages: N3 <ul><li>@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>. </li></ul><ul><li>@prefix rdfs:<http://www.w3.org/TR/rdf-schema/>. </li></ul><ul><li>@prefix uva:<http://www.uva.nl/rdf#>. </li></ul><ul><li>@prefix courses:<http://www.uva.nl/courses#>. </li></ul><ul><li>@prefix :<http://www.uva.nl/people#>. </li></ul><ul><li>uva:Professor a rdfs:Class; </li></ul><ul><li>rdfs:subClassOf uva:StaffMember. </li></ul><ul><li>uva:teaches a rdf:Property; </li></ul><ul><li>rdfs:domain uva:Professor; </li></ul><ul><li>rdfs:range uva:Course. </li></ul><ul><li>:joost a uva:Professor; </li></ul><ul><li>uva:name &quot;Joost Breuker”^^xsd:string; </li></ul><ul><li>uva:teaches courses:kr2007. </li></ul><ul><li>courses:kr2007 a uva:Course. </li></ul>
  14. 14. Languages: Important Message <ul><li>RDF statements are: </li></ul><ul><ul><li>Triples <subject, predicate,object> </li></ul></ul><ul><ul><li>Distributed </li></ul></ul><ul><ul><li>Always about something else </li></ul></ul><ul><ul><li>... but can be about other RDF triples as well. </li></ul></ul>
  15. 15. Integration <ul><li>How to add this ‘meta’ to my ‘data’? </li></ul><ul><li>Three options: </li></ul><ul><ul><li>Oldfashioned HTML: <link rel='meta' type='application/rdf+xml' href='http://www.leibnizcenter.org/~hoekstra/foaf.rdf' title='FOAF'> </li></ul></ul><ul><ul><li>HTTP 303 `see other’ http://www.w3.org/TR/swbp-vocab-pub/ </li></ul></ul><ul><ul><li>Inline </li></ul></ul>
  16. 16. Integration: 303 See Other
  17. 17. Integration: Inline <ul><li>RDFa </li></ul><ul><ul><li>Attributes on XHTML elements </li></ul></ul><ul><ul><li>http://www.w3.org/TR/xhtml-rdfa-primer </li></ul></ul><ul><ul><li>Standard XHTML: </li></ul></ul><ul><ul><ul><li>Predicate: @rel, @rev </li></ul></ul></ul><ul><ul><ul><li>Object: @href, @src (embedded) </li></ul></ul></ul><ul><ul><li>RDFa: </li></ul></ul><ul><ul><ul><li>Subject: @about </li></ul></ul></ul><ul><ul><ul><li>Predicate: @property </li></ul></ul></ul><ul><ul><ul><li>Object: @resource (not clickable) </li></ul></ul></ul><ul><ul><ul><li>Datatype: @datatype </li></ul></ul></ul><ul><ul><ul><li>Alternative: @content </li></ul></ul></ul><ul><ul><ul><li>RDF Type: @instanceof </li></ul></ul></ul>
  18. 18. Integration: RDFa Example <ul><li>In XHTML: </li></ul><ul><li><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> </li></ul><ul><li><!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML+RDFa 1.0//EN&quot; </li></ul><ul><li>&quot;http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd&quot;> </li></ul><ul><li><html xmlns:cal=&quot;http://www.w3.org/2002/12/cal/ical#&quot;> </li></ul><ul><li><head><title>Jo's Friends and Family Blog</title></head> </li></ul><ul><li><body> </li></ul><ul><li><p instanceof=&quot;cal:Vevent&quot;> </li></ul><ul><li>I'm holding </li></ul><ul><li><span property=&quot;cal:summary&quot;>one last summer Barbecue</span>, </li></ul><ul><li>on </li></ul><ul><li><span property=&quot;cal:dtstart&quot; content=&quot;20070916T1600-0500&quot;> </li></ul><ul><li>September 16th at 4pm. </li></ul><ul><li></span> </li></ul><ul><li></p> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul><ul><li>In RDF: </li></ul><ul><li>_:blanknode0 </li></ul><ul><li>rdf:type cal:Vevent; </li></ul><ul><li>cal:summary &quot;last summer Barbecue&quot;; </li></ul><ul><li>cal:dtstart &quot;20070916T1600-0500&quot; . </li></ul>
  19. 19. Integration: GRDDL <ul><li>Gleaning Resource Descriptions from Dialects of Languages </li></ul><ul><li>http://www.w3.org/TR/grddl/ </li></ul><ul><li>In HTML/XML instance documents: </li></ul><ul><li><html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; </li></ul><ul><li>xmlns:grddl='http://www.w3.org/2003/g/data-view#' </li></ul><ul><li>grddl:transformation=&quot;glean_title.xsl </li></ul><ul><li>http://www.w3.org/2001/sw/grddl-wg/td/getAuthor.xsl”> </li></ul><ul><li>In XML Schema documents: </li></ul><ul><li><xsd:annotation> </li></ul><ul><li><xsd:appinfo> </li></ul><ul><li><rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;> </li></ul><ul><li><rdf:Description rdf:about=&quot;http://www.metalex.eu/latest&quot;> </li></ul><ul><li> <data-view:namespaceTransformation </li></ul><ul><li> rdf:resource=”http://www.metalex.eu/grddl/metalex2owl.xsl&quot; /> </li></ul><ul><li></rdf:Description> </li></ul><ul><li></rdf:RDF> </li></ul><ul><li></xsd:appinfo> </li></ul><ul><li></xsd:annotation> </li></ul>
  20. 20. Storage (on the web) <ul><li>As documents </li></ul><ul><ul><li>.rdf, .n3, .turtle, .html </li></ul></ul><ul><li>In a RDF triple-store </li></ul><ul><ul><li>Sesame ( http://www.openrdf.org ) </li></ul></ul><ul><ul><li>Jena/Joseki ( http://jena.sourceforge.net ) </li></ul></ul><ul><li>RDF(S)/OWL reasoning </li></ul><ul><ul><li>Jena’s OntModel </li></ul></ul><ul><ul><li>Sesame OWLIM Sail module </li></ul></ul><ul><li>SPARQL Endpoints </li></ul><ul><ul><li>Results as JSON (JavaScript Object Notation) </li></ul></ul><ul><li>http://draco.leibnizcenter.org:8180/openrdf-sesame </li></ul>
  21. 21. Querying <ul><li>Many languages </li></ul><ul><ul><li>SPARQL, nRQL, SeRQL, etc. </li></ul></ul><ul><li>SPARQL: </li></ul><ul><ul><li>http://www.w3.org/TR/rdf-sparql-query/ </li></ul></ul><ul><li>Example </li></ul><ul><li>PREFIX course: <http://www.uva.nl/courses#> </li></ul><ul><li>PREFIX uva: <http://www.uva.nl/rdf#> </li></ul><ul><li>SELECT ?name </li></ul><ul><li>WHERE </li></ul><ul><li>{ ?x uva:teaches course:kr2007. </li></ul><ul><li>?x uva:name ?name } </li></ul><ul><li>?x binds with <http://www.uva.nl/people#joost> </li></ul><ul><li>?name binds with “Joost Breuker”^^xsd:string </li></ul>
  22. 22. Querying: SPARQL <ul><li>Construct </li></ul><ul><li>PREFIX course: <http://www.uva.nl/courses#> </li></ul><ul><li>PREFIX uva: <http://www.uva.nl/rdf#> </li></ul><ul><li>CONSTRUCT { ?x uva:teaches course:kr2008 } </li></ul><ul><li>WHERE { ?x uva:teaches course:kr2007 } </li></ul><ul><li>Filtering </li></ul><ul><ul><li>Strings (regexp), Integers (values) </li></ul></ul><ul><li>Grouping, patterns, collections, optionals </li></ul>
  23. 23. Browsing and Viewing <ul><li>How to unlock your RDF to users? </li></ul><ul><ul><li>Custom applications (e.g. Legal Atlas) </li></ul></ul><ul><ul><li>Generic RDF Browsers </li></ul></ul><ul><li>How to present your RDF to users? </li></ul><ul><ul><li>Custom applications </li></ul></ul><ul><ul><li>Generic RDF Visualisation </li></ul></ul>
  24. 24. Browsing: Facets <ul><li>Multi-dimensional search </li></ul><ul><li>User filters available information </li></ul><ul><li>Context dependent </li></ul><ul><li>Facet </li></ul><ul><ul><li>UI element </li></ul></ul><ul><ul><li>Values of a property </li></ul></ul><ul><ul><li>Number of results </li></ul></ul><ul><li>Query building </li></ul>
  25. 25. Browsing <ul><li>MIT Longwell </li></ul><ul><ul><li>http://simile.mit.edu/longwell/demo/libraries </li></ul></ul><ul><li>/facet </li></ul><ul><ul><li>http://slashfacet.semanticweb.org </li></ul></ul><ul><li>Flamenco </li></ul><ul><li>RDFBrowser </li></ul><ul><li>Exhibit </li></ul><ul><li>LENA </li></ul><ul><ul><li>http://draco.leibnizcenter.org:8180/lena </li></ul></ul>
  26. 26. /facet
  27. 27. Longwell
  28. 28. Viewing <ul><li>Tables are boring! </li></ul><ul><li>Different data? Different presentation: </li></ul><ul><ul><li>URI/URL </li></ul></ul><ul><ul><li>Images </li></ul></ul><ul><ul><li>Strings </li></ul></ul><ul><ul><li>Coordinates </li></ul></ul><ul><li>Filtering data </li></ul><ul><li>Aggregating data </li></ul>
  29. 29. Viewing: Fresnel <ul><li>RDF specification of </li></ul><ul><ul><li>What data to present, and </li></ul></ul><ul><ul><li>How to present it </li></ul></ul><ul><li>http://www.w3.org/2005/04/fresnel-info </li></ul><ul><li>Lenses </li></ul><ul><ul><li>Group information (class membership, SPARQL result) </li></ul></ul><ul><li>Formats </li></ul><ul><ul><li>Specify how property values should be rendered </li></ul></ul>
  30. 30. Viewing: Fresnel lens <ul><li>:foafPersonDefaultLens rdf:type fresnel:Lens ; </li></ul><ul><li>fresnel:purpose fresnel:defaultLens ; </li></ul><ul><li>fresnel:classLensDomain foaf:Person ; </li></ul><ul><li>fresnel:group :foafGroup ; </li></ul><ul><li>fresnel:showProperties ( foaf:name </li></ul><ul><li>foaf:surname </li></ul><ul><li>foaf:depiction ) . </li></ul><ul><li>:knowsLens rdf:type fresnel:Lens ; </li></ul><ul><li>fresnel:classLensDomain foaf:Person ; </li></ul><ul><li>fresnel:group :foafGroup ; </li></ul><ul><li>fresnel:showProperties ( foaf:name </li></ul><ul><li>foaf:surname </li></ul><ul><li>foaf:mbox </li></ul><ul><li>[ rdf:type fresnel:PropertyDescription ; </li></ul><ul><li>fresnel:property foaf:knows ; </li></ul><ul><li>fresnel:sublens :foafPersonDefaultLens ] ) . </li></ul>
  31. 31. Viewing: Fresnel format <ul><li>:foafGroup rdf:type fresnel:Group ; </li></ul><ul><li>fresnel:stylesheetLink <http://www.example.org/example.css> . </li></ul><ul><li>:depictFormat rdf:type fresnel:Format ; </li></ul><ul><li>fresnel:propertyFormatDomain foaf:depiction ; </li></ul><ul><li>fresnel:label fresnel:none ; </li></ul><ul><li>fresnel:value fresnel:image ; </li></ul><ul><li>fresnel:valueStyle &quot;imageWithThickBorder&quot;^^fresnel:styleClass ; </li></ul><ul><li>fresnel:group :foafGroup . </li></ul><ul><li>:urlFormat rdf:type fresnel:Format ; </li></ul><ul><li>fresnel:propertyFormatDomain foaf:homepage ; </li></ul><ul><li>fresnel:propertyFormatDomain foaf:mbox ; </li></ul><ul><li>fresnel:value fresnel:externalLink ; </li></ul><ul><li>fresnel:labelStyle &quot;basicLabel&quot;^^fresnel:styleClass ; </li></ul><ul><li>fresnel:valueStyle &quot;basicUrl&quot;^^fresnel:styleClass ; </li></ul><ul><li>fresnel:group :foafGroup . </li></ul>
  32. 32. Million dollar question <ul><li>... does the SemanticWeb really exist? </li></ul><ul><li>Semantics: yes </li></ul><ul><li>Web: mwoah </li></ul><ul><ul><li>Friend-of-a-Friend (FOAF) http://www.ldodds.com/foaf/foaf-a-matic </li></ul></ul><ul><ul><li>RSS feeds (pingbacks etc.) </li></ul></ul><ul><ul><li>Web 2.0: Tagging </li></ul></ul><ul><li>However </li></ul><ul><ul><li>The nuts ‘n bolts are ready, </li></ul></ul><ul><ul><li>And we’ve got the data! </li></ul></ul>
  33. 33. Compelling Example? <ul><li>Yahoo Pipes </li></ul><ul><li>http://pipes.yahoo.com </li></ul><ul><li>Aggregate, select, filter feeds </li></ul><ul><li>Feeds can be any data </li></ul>
  34. 34. Yahoo Pipes Editing
  35. 35. Yahoo Pipes Result
  36. 36. Resources <ul><li>http://www.w3.org RDF(S), N3, OWL, SPARQL, RDFa, GRDDL, XML, XMLSchema, XSLT, CSS, XPath, fresnel... </li></ul><ul><li>http://www.semanticweb.org /facet, other resources </li></ul><ul><li>http://www.planetrdf.com Aggregated RSS feed of the cool & famous </li></ul>

Notas do Editor

  • XPath doesn’t work

×