the semantic web and drupal 7 - loja 2013
TRANSCRIPT
![Page 1: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/1.jpg)
The Semantic Web and Drupal 7
Stéphane CorlosquetDrupal Summit Latino – Loja, EcuadorMarch, 2013
![Page 2: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/2.jpg)
About the speaker
● Stéphane “scor” Corlosquet● 7 years with Drupal● Software engineer at Acquia● Drupal 7 RDF core maintainer● Drupal Security Team member● Co-authored the
Definitive Guide to Drupal 7● Contrib modules: RDF Extensions,
SPARQL, schema.org, WebID● Member of the RDFa WG at W3C
![Page 3: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/3.jpg)
The Semantic Web
![Page 4: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/4.jpg)
The Web today
![Page 5: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/5.jpg)
Many information silos
Image credits: www.pidgintech.com
![Page 6: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/6.jpg)
Many isolated and disparate communities
Image credits: www.pidgintech.com
![Page 7: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/7.jpg)
Growing amount of information
● Blogs, News, Comments● Social platforms: Facebook, Google plus● Everyday more and more content is published● Desktop, laptops, tablets, smartphones...● Sensor data for weather, traffic, healthcare● Billions of public pages● Deep web?
![Page 8: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/8.jpg)
What do machines see?
![Page 9: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/9.jpg)
Challenge:
How can machines help ussearch all this information?
![Page 10: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/10.jpg)
Vision of the Semantic Web
● Transition to the Giant Global Graph● WWW = content+links
● GGG = WWW+relationships+descriptions
● Universal medium for data, information and knowledge exchange
![Page 11: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/11.jpg)
Evolution of the Web
![Page 12: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/12.jpg)
The One Machine
● All devices connected● Personal computers● Data servers● Cell phones● PDAs● RFID tags
http://www.kk.org/thetechnium/archives/2007/11/dimensions_of_t.php
![Page 13: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/13.jpg)
Key
● Agree on Standards
● Open Data
![Page 14: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/14.jpg)
Rich Snippets
![Page 18: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/18.jpg)
Why Structured Data in HTML
● Helps machines extractrelevant data from HTML
● Can make use of this datain new ways:
– enhanced search results– Knowledge graph
● Search engines only index HTML
![Page 19: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/19.jpg)
Structured Data in HTML
● HTML attributes
● Syntaxes– Microformats (@class, @rel)– RDFa (@property, @typeof, @resource…)– Microdata (@itemscope, @itemtype, @itemprop, …)
![Page 20: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/20.jpg)
Structured Data in HTML
● Evolution and cross-syntax influence
![Page 21: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/21.jpg)
Schema.org
![Page 22: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/22.jpg)
Schema.org
● Describe the type of your content (Person, Event, Recipe, Product, Book, Movie, etc.)
– 416 types and counting
● Each type has a set of properties– Common properties: name, description, image, url– Specific properties depending on the type (see type page
on schema.org)– 544 properties and counting
![Page 24: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/24.jpg)
Schema.org
![Page 25: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/25.jpg)
How does schema.org apply to Drupal?
● Content types
![Page 26: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/26.jpg)
How does schema.org apply to Drupal?
● From content types to RDF
![Page 27: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/27.jpg)
Schema.org module for Drupal
● Map your content types and fields to the schema.org terms
http://drupal.org/project/schemaorg
![Page 28: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/28.jpg)
Content types and Fields
![Page 29: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/29.jpg)
Content types and Fields
![Page 30: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/30.jpg)
Content types and Fields
![Page 31: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/31.jpg)
Example: Event
![Page 32: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/32.jpg)
Rich Snippet testing tool
● http://www.google.com/webmasters/tools/richsnippets
![Page 33: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/33.jpg)
Examples
● Events– “force11 events”: http://goo.gl/VVhNM– DrupalCon Munich: http://goo.gl/jgMvw– University of Waterloo: http://goo.gl/Df9hp
● Person– DGD7 – Jacine Luisi: http://t.co/rTK8N9K2– Stéphane Corlosquet: http://goo.gl/9dWdL
![Page 34: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/34.jpg)
Drupal, rNews and RDFa
Open Publish● Free Drupal distribution for building News sites● rNews support in RDFa● Download
![Page 35: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/35.jpg)
Useful modules
● http://drupal.org/project/schemaorg– UI for mapping content types and fields to schema.org– Documentation on drupal.org– Screencast + examples
● http://drupal.org/project/rdfa– Implements the latest RDFa 1.1 (Drupal core is 1.0)– HTML5 and RDFa– Under development
● http://drupal.org/project/microdata– Standalone module– HTML5 Microdata
![Page 36: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/36.jpg)
Schema.org module
Play time!
http://www.google.com/webmasters/tools/richsnippets
http://bit.ly/schema-event
![Page 37: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/37.jpg)
Beyond SEO:How is RDF architected
in Drupal 7
![Page 38: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/38.jpg)
History of RDF in Drupal
● rdf.php (2000, Dries)● FOAF, vCard (2004, walkah)● Relationship (2005, dman)● Semantic Search (2006, hendler)● RDF (2007, Arto)● OpenCalais (febbraro, 2008)● RDF CCK (2008, scor)
![Page 39: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/39.jpg)
http://en.wikipedia.org/wiki/File:Oriente_Station_Lisboa_roof.jpg
Architecture
● User driven data model● Content type => RDF class● Field => RDF property● Node => RDF resource
![Page 40: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/40.jpg)
Content types and Fields
![Page 41: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/41.jpg)
Content types and Fields
![Page 42: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/42.jpg)
Node
![Page 43: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/43.jpg)
Drupal 7 and RDF
● The RDF mapping API allows any vocabulary ● Default mappings on blogs, forums, comments,
etc. using FOAF, SIOC, DC, SKOS● Drupal 7 core outputs these mappings in RDFa● Mappings can be changed to include other
vocabularies like schema.org
![Page 44: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/44.jpg)
Drupal 7 default RDF mappings
![Page 45: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/45.jpg)
Drupal 7 core RDF limitations
● No schema.org out of the box● No UI for managing the RDF mappings● Only core fields are supported (text, file, image)
– No support for contrib fields: addressfield, fivestar
● No native support for Views or Panels– Display suite 2.0 is OK
● Some contrib modules can help● Drupal 8 to fix these many of these issues
![Page 46: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/46.jpg)
Drupal 7 and RDF
● Contributed module for more features● RDF Extensions
● Serialization formats: RDF/XML, Turtle, N-Triples● Mapping UI
● SPARQL● Expose Drupal RDF data in a SPARQL Endpoint
● SPARQL Views● Display remote RDF data in Drupal using SPARQL
● JSON-LD● Expose Drupal RDF data as JSON-LD (CORS-enabled)
● Features and packaging● Build distributions / deployment workflow
![Page 48: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/48.jpg)
SPARQL Endpoint
● Public endpoint available at /sparql● http://prefix.cc/sioc,rnews.sparql
![Page 49: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/49.jpg)
RDFa 1.1
● Published as W3C Recommendation● RDFa Lite● RDFa 1.1 Full● Leaner markup● http://rdfa.info/play/
![Page 50: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/50.jpg)
RDFa 1.1
● Works with HTML5● No dependency on XHTML● HTML5 doctype● Popular themes have been updated (Omega,
Zen, Adaptive Themes)
![Page 51: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/51.jpg)
Demos
rNews by International Press Telecommunications Council (IPTC)
– Open Publish
PREFIX rnews: <http://iptc.org/std/rNews/2011-10-07#>
SELECT * WHERE { ?s a rnews:Article; rnews:name ?title.}
![Page 52: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/52.jpg)
JSON-LD in Drupal
● Client side as well as server side friendly● Browser Scripting:
– Native javascript format– RDFa API in the DOM
● Data can be fetched from anywhere:– Cross-Origin Resource Sharing (CORS) enabled
● Client can mash data● http://drupal.org/project/jsonld
![Page 53: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/53.jpg)
Demos
● Occupy Directory– http://directory.occupy.net/occupations– JSON-LD: http://directory.occupy.net/node/19652.jsonld
● Federated General Assembly– Drupal distribution for occupy movement– http://wiki.occupy.net/wiki/Federated_General_Assembly
![Page 54: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/54.jpg)
Domeo + Drupal
● Data mash up from independent, but related sources
![Page 55: The Semantic Web and Drupal 7 - Loja 2013](https://reader033.vdocuments.net/reader033/viewer/2022042821/55d4e710bb61ebbe5f8b4761/html5/thumbnails/55.jpg)
Domeo + Drupal
● Data mash up from independent, but related sources