and the Semantic Web
Ruby on Rails
& &
Nathalie Steinmetz
(http://nathaliesteinmetz.net)
Semantic Web? Wait, what’s that?
I love Ruby on Rails
I Ruby on Rails
vs.
Syntax vs. semantics of a
sentence:
On the Web:
...
Semantic Web? So…
2001
Tim Berners-Lee
A Web of data:
“The Semantic Web provides a
common framework that
allows data to be...
Two main goals:
1. Describe real world objects in a structured way
2. Integrate and combine data from different sources
Se...
Semantic Web: in action
How to markup
web pages:
Schema.org – recognized by Bing,
Google, Yahoo and Yandex:
RDFa:
Embeddin...
Semantic Web: Linked Data
Linked Open Data Cloud:Google, Microsoft,
Facebook:
Bing
Snapshot
Google
Knowledge
Graph
Faceboo...
Semantic Web on Rails
Ruby RDF Project:
ruby-rdf.github.io
Automated testing of
HTML5 microdata:
Contains numerous gems su...
Questions?
More info at:
Semantic Web: http://www.w3.org/standards/semanticweb/
RDF: http://www.w3.org/standards/techs/rdf...
Upcoming SlideShare
Loading in …5
×

Ruby on Rails and the Semantic Web

2,539 views

Published on

Slides for lightning talk, providing short introduction to the Semantic Web, and outlining current initiatives to work with semantic web technologies within the Ruby on Rails framework.

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

No Downloads
Views
Total views
2,539
On SlideShare
0
From Embeds
0
Number of Embeds
42
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Ruby on Rails and the Semantic Web

  1. 1. and the Semantic Web Ruby on Rails & & Nathalie Steinmetz (http://nathaliesteinmetz.net)
  2. 2. Semantic Web? Wait, what’s that? I love Ruby on Rails I Ruby on Rails vs. Syntax vs. semantics of a sentence: On the Web: codefellows.org Syntax: HTML Semantics: none ?
  3. 3. Semantic Web? So… 2001 Tim Berners-Lee A Web of data: “The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries.”
  4. 4. Two main goals: 1. Describe real world objects in a structured way 2. Integrate and combine data from different sources Semantic Web: RDF & vocabularies Main language: RDF Nathalie Ruby on Rails likes Subject Predicate Object Use existing vocabularies: FOAF <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/vocabulary#"> <ex:Nathalie> <ex:likes><ex:Ruby_on_Rails> </rdf:RDF>
  5. 5. Semantic Web: in action How to markup web pages: Schema.org – recognized by Bing, Google, Yahoo and Yandex: RDFa: Embedding RDF into HTML JSON-LD: Lightweight Linked Data format based on JSON Microdata: Embedding machine-readable data into HTML <div> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954)</span> <span>Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html">Trailer</a> </div> <div itemscope itemtype ="http://schema.org/Movie"> <h1 itemprop="name“ Avatar</h1> <div itemprop="director" itemscope itemtype="http://schema.org/Person"> Director: <span itemprop="name">James Cameron</span> (born <span itemprop="birthDate">August 16, 1954)</span> </div> <span itemprop="genre">Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a> </div>
  6. 6. Semantic Web: Linked Data Linked Open Data Cloud:Google, Microsoft, Facebook: Bing Snapshot Google Knowledge Graph Facebook Graph Search
  7. 7. Semantic Web on Rails Ruby RDF Project: ruby-rdf.github.io Automated testing of HTML5 microdata: Contains numerous gems supporting Linked Data and Semantic Web programming: • gem ‘rdf’ • gem ‘rdf-rdfa’ • gem ‘rdf-microdata’ • gem ‘json-ld’ • rack middleware ‘rack-sparql’ • rack middleware ‘rack-sesame’ • gem linkeddata (combination of several gems) Ruby library for extracting HTML5 microdata: • gem ‘microdata’  Integration tests using test-unit test "the top level item is a schema.org/Person" do assert_equal ['http://schema.org/Person'], @items.first.type end test "the Person should have a name, url, and job title" do person = @items.first assert_equal ['Jason Ronallo'], person.properties['name'] assert_equal ['http://twitter.com/ronallo'], person.properties['url'] assert_equal ['Ass. Head of Digital Library Initiatives'], person.properties['jobTitle'] end
  8. 8. Questions? More info at: Semantic Web: http://www.w3.org/standards/semanticweb/ RDF: http://www.w3.org/standards/techs/rdf#w3c_all RDFa: http://rdfa.info/ JSON-LD: http://json-ld.org/ RDF.rb: http://rdf.rubyforge.org/ Ruby RDF project: http://ruby-rdf.github.io/ HTML5 microdata test: http://jronallo.github.io/blog/automated-testing-of-html5-microdata-in-rails/

×