Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SKOS, RDFa, Microformats, Microdata


Published on

Lecture slides presented in Web Information Systems course.

SKOS, RDFa, Microformats, Microdata

  1. 1. SKOS, RDFa & Co,Linked Data Related ExamplesINFO 4302 - April 20, 2011Bernhard Haslhofer - Cornell University
  2. 2. Today we talk about...• Simple Knowledge Organization System (SKOS)• Machine-readable data in (X)HTML(5) (RDFa, Microformats, Microdata)• Search Engines and machine-readable data• Facebook Graph API & Open Graph Protocol
  3. 3. Linked Data Recap
  4. 4. Why Linked Data?• There is lots of information on the Web• ... valuable information that can be (re-)used• Problem • information is usually expressed in the form of HTML documents • the underlying raw data are locked in closed data silos (mostly DBMS)
  5. 5. Why Linked Data?• The Web is successful because it provides • Uniform encoding (HTML) • Uniform addressing (URI) • Uniform transportation (HTTP) for the exchange of documents.• Why not apply the same mechanism to the underlying data?
  6. 6. What is Linked Data?• A method to build a Web of Data• Architectural style, set of standards Web
  7. 7. Publishing Data• Distinguish between non-information and information resource• Sample non-information resource •• Sample information resource • - HTML • - RDF
  8. 8. Publishing Data GET Accept: application/rdf+xml 303 See Other Location: GET Accept: application/rdf+xml 200 OK ... <?xml version="1.0" encoding="utf-8"?> <rdf:RDF ...
  9. 9. Simple Knowledge Organization System (SKOS)• A language for describing controlled vocabularies (taxonomies, thesauri, classification schemes) Category:1980s_horror_films skos:subject rdf:type skos:broader The_Shining_(film) skos/core#Concept rdf:type Category:1980s_films
  10. 10. Excursus: The Semantic Spectrum
  11. 11. Knowledge Organization Systems (KOS)semanticexpressiveness Ontology DL, FOL, etc OWL Data Model UML ER Thesaurus Taxonomy XML/S SKOS Folksonomy Glossary Term/Tag list complexity
  12. 12. Glossary• A simple (alphabetical) list of terms and their definitions for a particular domain of knowledge• Useful for creating clear and unambiguous term definitions
  13. 13. Folksonomy• Collaborative tagging systems• Web 2.0., social-media, etc...
  14. 14. Controlled Vocabulary• A simple list of terms, definitions and naming conventions• Some process “controls” adding and removing term definitions to ensure consistency• Terms are often defined in relationship to each other• Taxonomies, Thesauri, and Ontologies are special forms of controlled vocabularies
  15. 15. Taxonomy• Classification of entities in a hierarchy• A taxonomy node stands for a real-world entity animate object agent subclass of person organization manager employee
  16. 16. source:
  17. 17. Thesaurus• Associates the meaning of a term with the meaning of another term• hypernym, hyponym, synonym, antonym Imagery Aerial imagery Infrared imagery Radar imagery Combat support equipment Moving target Radar Intelligence and electronic indicators photography warfare equipment Imaging systems narrower than Infrared imaging Imaging radar systems related to
  18. 18. Ontology• Defines concepts that represent an area of knowledge• Machine-read and -interpretable representation• Classes, instances, relationships, properties, functions, constraints, etc.
  19. 19.
  20. 20. Simple KnowledgeOrganization System (SKOS)
  21. 21. What is SKOS?• A model for expressing the basic structure and content of concept schemes such as thesauri, classification schemes, taxonomies, folksonomies, and other similar types of controlled vocabularies• Allows concepts to be composed and published as Linked Data on the Web• Hides the complexity of OWL - easy to use
  22. 22. semanticexpressiveness Ontology DL, FOL, etc OWL Data Model UML ER Thesaurus Taxonomy XML/S SKOS Folksonomy Glossary Term/Tag list complexity
  23. 23. SKOS Concepts are...• ... identified with URIs• ... labeled with 1..* natural language strings• ... documented with various types of notes• ... semantically linked to each other• ... aggregated into concept schemes
  24. 24. Example SKOS Concept
  25. 25. skos:Concept• Concepts are • the units of thought: ideas, meanings, categories of objects, etc. • abstract entities which are independent of the terms used to label them skos:Concept rdf:type lcsh:sh2007025344#concept @prefix skos: <> . @prefix lcsh: <> .
  26. 26. skos:(pref|alt|hidden)Label• Labels refer to concepts’ natural language(s) • skos:prefLabel: the preferred lexical label • skos:altLabel: alternative lexical labels (e.g., synonyms) • skos:hiddenLabel: labels useful for indexing "Parody films"@en skos:prefLabel lcsh:sh2007025344#concept skos:altLabel "Movie parodies"@en skos:altLabel "Send-up films"@en
  27. 27. SKOS Semantic Relationships• The meaning of a concept is also defined by its links to other concepts • skos:broader: hierarchical link to a more general concept • skos:narrower: hierarchical link to a more specific concept • skos:related: associative (non-hierarchical) link skos:broader lcsh:sh2007025038#concept skos:prefLabel "Comedy films"@en skos:narrower skos:broader lcsh:sh2007025344#concept skos:prefLabel "Parody films"@en skos:narrower
  28. 28. SKOS Documentary Notes• Add further human-readable documentation • skos:scopeNote: info about intended meaning • skos:definition: complete explanation of meaning • skos:example: example concept use “This heading is used as a genre/form heading for films that comically imitate lcsh:sh2007025038#concept skos:scopeNote another work or group of works of a more serious nature.”@en skos:prefLabel "Comedy films"@en
  29. 29. skos:ConceptScheme• Allow the organization of skos:Concepts in some Knowledge Organization Scheme (KOS) skos:ConceptScheme lcsh:#genreFormTerms skos:inScheme skos:inScheme skos:Concept skos:Concept lcsh:sh2007025038#concept ...
  30. 30. Example• Dereference and analyze “Jack Nicholson” @ New York Times • •
  31. 31. RDFa, Microformats &Microdata
  32. 32. Why RDFa? GET Accept: application/rdf+xml 303 See Other Location: Oh dear! GET Accept: application/rdf+xml 200 OK ... <?xml version="1.0" encoding="utf-8"?> <rdf:RDF ...
  33. 33. What is RDFa?• A mechanism for embedding RDF metadata within XHTML 1.1 Web documents• Defines a set of attributes to augment visual data with machine-readable hints• User agents can extract triples from RDFa- enables Web pages
  34. 34. What is RDFa?• Markup human-readable data (HTML) with machine-readable indicators
  35. 35. RDFa Example XHTML...All content on this site is licensed under<a href=""> a Creative Commons License</a>. XHTML + RDFa...All content on this site is licensed under<a rel=”license” href=""> a Creative Commons License</a>.
  36. 36. RDFa Attributes• about and src: the resource the metadata is about• rel and rev: (reverse) relationship between resources• href and resource: the partner resource• property: a property for the content of an element• content: override content of an element• datatype: specify the datatype of text• typeof: specifies the RDF type(s) or a subject
  37. 37. RDFa Example XHTML<div> <h2>The trouble with Bob</h2> <h3>Alice</h3> ...</div> XHTML + RDFa<div xmlns:dc=""> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ...</div>
  38. 38. RDFa ExampleXHTML + RDFa<div xmlns:dc="">! ! ! <div about="/alice/posts/trouble_with_bob"> <h2 property="dc:title">The trouble with Bob</h2> <h3 property="dc:creator">Alice</h3> ... </div> <div about="/alice/posts/jos_barbecue"> <h2 property="dc:title">Jos Barbecue</h2> <h3 property="dc:creator">Eve</h3> ... </div> ...</div>
  39. 39. RDFa ExampleXHTML + RDFa<div typeof="foaf:Person" xmlns:foaf=""> <p property="foaf:name"> Alice Birpemswick </p> <p> Email: <a rel="foaf:mbox"href=""></a> </p> <p> Phone: <a rel="foaf:phone" href="tel:+1-617-555-7332">+1617.555.7332</a> </p></div>
  40. 40. RDFa Examples• 9780596520694/• Rottentomatoes: http://
  41. 41. Microformats• A Microformat extends conventional HTML tags with semantic information• Started by Technorati, Inc.; now community- driven (IRC, mailing list, blogs)• Make use of the following (X)HTML attributes • class • rel
  42. 42. Microformats ExampleHTML<div> <div>Joe Doe</div> <div>Jo</div> <div>The Example Company</div> <div>604-555-1234</div> <a href=""></a></div>XHTML + Microformats<head profile="">...</head>...<div class="vcard"> <div class="fn">Joe Doe</div> <div class="nickname">Jo</div> <div class="org">The Example Company</div> <div class="tel">604-555-1234</div> <a class="url" href=""></a></div>
  43. 43. Microformats Example
  44. 44. Available Microformats
  45. 45. Microformats vs. RDFa <div xmlns="" xmlns:rdf="" xmlns:rdfs="" xmlns:v=""> <div about="" typeof="v:VCard"> <span property="v:fn">Bernhard Haslhofer</span> <span property="v:nickname">behas</span> <div rel="v:adr"> <div typeof="v:Address v:Work"> <span property="v:street-address">301 College Avenue</span> <span property="v:locality">Ithaca</span>, <span property="v:postal-code">14850</span>, <span property="v:country-name">United States</span>. </div> </div> <a rel="v:email" href=""></a>. </div> </div>Sample vCard Object in RDFa (see
  46. 46. Microformats vs. RDFa <div class="vcard"> <span class="fn">Bernhard Haslhofer</span> <div class="adr"> <div class="street-address">301 College Avenue</div> <span class="locality">Ithaca</span> <span class="postal-code">14850</span> <span class="country-name">United States</span> </div> <a class="email" href=""></a> </div>hCard sample created with
  47. 47. Microformats RDFa flat namespace XML namespaces support HTML4, XHTML 1.1, and support for XHTML 1.1 HTML 5 use latent HTML attributes introduces new metadata attributes vocabulary defined by one open to any RDF-based vocabulary organization/communityAlso see:
  48. 48. Microdata (HTML5)• A very young HTML 5 proposition that extends Microformats and addresses its shortcomings• Items are created within an itemscope• Ever item is assigned an arbitrary number of properties (itemprop)• Uses global identifiers for typing and naming items
  49. 49. Microdata Example<div itemscope itemtype=""> <span itemprop="name">Bernhard Haslhofer</span>, <span itemprop="nickname">behas</span>. <div itemprop="address" itemscope itemtype=""> <span itemprop="street-address">301 College Avenue</span> <span itemprop="locality">Ithaca</span> <span itemprop="country-name">United States</span> </div></div>
  50. 50. Search engines andmachine-readable data
  51. 51. Google Rich Snippets• Reviews• People• Products• Businesses and organizations• Recipes• Events
  52. 52. Google Rich SnippetsHTML<div>L’Amourita PizzaReviewed by Ulysses Grant on Jan 6.Delicious, tasty pizza on Eastlake!LAmourita serves up traditional wood-fired Neapolitan-style pizza,brought to your table promptly and without fuss. An ideal neighborhood pizza joint.Rating: 4.5</div>
  53. 53. Google Rich SnippetsMicrodata<div> <div itemscope itemtype=""> <span itemprop="itemreviewed">L’Amourita Pizza</span> Reviewed by <span itemprop="reviewer">Ulysses Grant</span> on <time itemprop="dtreviewed" datetime="2009-01-06">Jan 6</time>. <span itemprop="summary">Delicious, tasty pizza in Eastlake!</span> <span itemprop="description">LAmourita serves up traditional wood-firedNeapolitan-style pizza, brought to your table promptly and without fuss. An ideal neighborhood pizzajoint.</span> Rating: <span itemprop="rating">4.5</span> </div></div>
  54. 54. Google Rich SnippetsMicroformats<div class="hreview"> <span class="item"> <span class="fn">L’Amourita Pizza</span> </span> Reviewed by <span class="reviewer">Ulysses Grant</span> on <span class="dtreviewed"> Jan 6<span class="value-title" title="2009-01-06"></span> </span>. <span class="summary">Delicious, tasty pizza on Eastlake!</span> <span class="description">LAmourita serves up traditional wood-fired Neapolitan-style pizza, brought to your table promptly and without fuss. An ideal neighborhood pizza joint.</span> Rating: <span class="rating">4.5</span></div>
  55. 55. Google Rich SnippetsRDFa<div xmlns:v="" typeof="v:Review"> <span property="v:itemreviewed">L’Amourita Pizza</span> Reviewed by <span property="v:reviewer">Ulysses Grant</span> on <span property="v:dtreviewed" content="2009-01-06">Jan 6</span>. <span property="v:summary">Delicious, tasty pizza on Eastlake!</span> <span property="v:description">LAmourita serves up traditional wood-fired Neapolitan-style pizza, brought to your table promptly and without fuss. An ideal neighborhood pizza joint.</span> Rating: <span property="v:rating">4.5</span></div>
  56. 56. Facebook Graph API &Open Graph Protocol
  57. 57. Readings
  58. 58. Required Reading• SKOS Primer:• RDFa Primer: Bridging the Human and Data Webs.• HTML Microdata:• Microformats:
  59. 59. Recommended Readings• SKOS Vocabularies Overview:•• CC REL: Creative Commons Rights Expression Language (CC REL)
  60. 60. Dream RDFa HTML 5Reality Microdata ~2000 2011source: