Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Linked Data in Use - Front in Bahia 2014
Search
Ícaro Medeiros
May 14, 2024
14
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Linked Data in Use - Front in Bahia 2014
Ícaro Medeiros
May 14, 2024
More Decks by Ícaro Medeiros
See All by Ícaro Medeiros
WWW 2013 - Linked Data at Globo.com
icaromedeiros
0
41
Linked Data, Big Data and User Science at globo.com
icaromedeiros
0
14
Why Python is better for Data Science - SP Big Data Meetup
icaromedeiros
0
23
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
The Language of Interfaces
destraynor
162
27k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Navigating Team Friction
lara
192
16k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Transcript
LINKED DATA IN USE
Ícaro Medeiros
[email protected]
Time de Semântica
[email protected]
globo.com Front in
Bahia 13/9/2014 LINKED DATA IN USE Schema.org, JSON-LD, and hypermedia APIs
WHAT IS LINKED DATA?
SEMANTIC WEB DONE RIGHT
"I have a dream for the web in which computers
become capable of analyzing all the data on the web - the content, links, and transactions between people and computers." Tim Berners-Lee
ROBERTO CARLOS GOAL AT MARACANÃ
http://www.bbc.co.uk/blogs/legacy/radiolabs/s5/linked-data/s5.html
http://www.bbc.co.uk/blogs/legacy/radiolabs/s5/linked-data/s5.html
Standard Vocabularies • Dublin Core: publications • FOAF: people •
SIOC: online communities • DBPedia: Wikipedia in triples
Linked Data Principles 1. Use URIs as names for things
2. Use HTTP URIs so that people can look up those names. 3. When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL) 4. Include links to other URIs, so that they can discover more things.
Or… 1. Entity identity 2. Access 3. Structure 4. Integration
RDF AND SPARQL
Triple representation subject predicate object Neymar is a player Barcelona
is a team Neymar plays for Barcelona
<Neymar> <Barcelona> <Santos> <Player> <Time> <BarcelonaXSantos:02082013> <Partida> is a is
a is a plays for is a home team away team <Camp Nou> location "2013/08/02" date
RDF triples @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix foaf:
<http://xmlns.com/foaf/0.1/>. @prefix dbpedia: <http://dbpedia.org/ontology> esportes:Neymar rdf:type dbpedia:SoccerPlayer ; rdfs:label "Neymar" ; foaf:name "Neymar da Silva Santos Júnior" ; dbpedia:birthDate "05/02/1992" ; owl:sameAs dbpedia:Neymar . Linking datasets
LINKED DATASETS
SPARQL query Select all instances of dbpedia:SoccerPlayer class and its
names SELECT ?player ?name FROM <http://dbpedia.org> WHERE { ?player rdf:type dbpedia:SoccerPlayer ; rdfs:label ?name . }
• Complexity (ontologies?) • NO clear advantage • Triplestore databases:
immature • Missing a killer application • Fax problem • Slow adoption Problems
LINKED DATA WITHOUT RDF?
DON’T YOU WORRY ABOUT A schema.org/Thing
SCHEMA.ORG
None
RICH SNIPPETS GOOGLE NOW KNOWLEDGE GRAPH CLEAR ADVANTAGE
RICH SNIPPETS City Date Location
None
GMAIL https://developers.google.com/gmail/actions/reference/ fl ight-reservation?hl=pt-BR
GOOGLE NOW
MAPS
SERP
<html itemscope itemtype="http://schema.org/Event"> <head> <title itemprop="name"> Front in Maceió </title>
crawler saves annotation in KG search results enhanced
ONE VOCABULARY TO RULE THEM ALL
HOW TO DO IT?
<html itemscope itemtype="http://schema.org/Event"> <head> <title itemprop="name"> Front in Bahia </title>
... MICRODATA
<html itemscope itemtype="http://schema.org/Event"> ... <section itemprop="location" itemscope itemtype="http://schema.org/Place"> <span itemprop="name">CESMAC</span>
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality"> Maceió </span> ... NESTED PROPERTIES
Schema.org usage • Sample 12B pages (Google Index) • 6%
domains • ~21% pages • Avg entities/page: 6 • Avg facts/page: 26 http://www.slideshare.net/rvguha/sem-tech2014c
JSON-LD
Plain old JSON { "name": "Keith Urban", "url": "http://www.keithurban.net/tour/420", }
{ "@context": "http://schema.org", "@type": "MusicEvent", "name": "Keith Urban", "url": "http://www.keithurban.net/tour/420",
} JSON-LD
Advantages • Semantic layer on top of JSON • Self-described
• Can be added to existing APIs • JSON is extensively used • Data can be anchored in schema.org • Easy serialization to RDF
JSON-LD AND HYPERMEDIA APIS
GET /events/1 HTTP/1.1 Host: example.com ==================================== HTTP/1.0 200 OK ...
Content-Type: application/json Link: <example.com/events/1.jsonld>; rel=http://www.w3.org/ns/json-ld#context; type=application/ld+json { "name": "Keith Urban", "url": "http://www.keithurban.net/tour/420", } Client follows link (hypermedia API)
{ "@context": "http://schema.org", "@type": "MusicEvent", "@id": "/events/1", "name": "Keith Urban",
"url": "http://www.keithurban.net/tour/420", } Self-described Resource
{ "@context": "http://schema.org", "@type": "MusicEvent", "@id": "/events/1", "name": "Keith Urban",
"url": "http://www.keithurban.net/tour/420", "offers": [{ "@id": "/events/1/offer/1", "@type": "Offer" }]} Client follows link Resource+links
JSON-SCHEMA
GET /events/1 HTTP/1.1 Host: example2.com ==================================== HTTP/1.0 200 OK …
Content-Type: application/json; profile=/events/1/_schema { "name": "Keith Urban", "url": "http://www.keithurban.net/tour/420", } Client follows link (hypermedia API) Schema in different resource
GET /events/1/_schema HTTP/1.1 Host: example2.com ==================================== HTTP/1.0 200 OK …
{ "title": "Event", "type": "object", "properties": { "name": {"type": "string"}, "url": {"type": "url"} }, "links": { "rel": "offers", "href": "/events/1/offers" } } Client does not know URLs, just 'rel's
HYPERMEDIA APIS
Hypermedia? • Don’t remind URLS. Navigate! • Decoupling server and
client • Content negotiation • Application treated as State Machine
/ GET { "items": [ { "title": "News", "@id": "http://example.com/news/",
"resource_id": "news" }, { "title": "Sports", "@id": "http://example.com/sports/", "resource_id": "sports" } ], "links": {} }
/ GET # continuation "links": [ { "href": “http://example.com/“, "rel":
"self" }, { "href": "http://example.com/{resource_id}", "rel": "item" }, { "href": "http://example.com", "method": "POST", "rel": "create" }, { "href": "http://example.com/{resource_id}", "method": "DELETE", "rel": "delete" }, { "href": "http://example.com/?page=2", "method": "GET", "rel": "next" } ] …
/ GET /sports rel:item resource_id:sports GET
self /sports/Team/ Barcelona /sports/ inCollection item create delete replace Relations
JSON-LD IN HTML
JSON-LD annotation <script type="application/ld+json"> [{ "@context": "http://schema.org", "@type": "MusicEvent", "name":
"Keith Urban", "url": "http://www.keithurban.net/tour/420", "startDate": "2014-09-07", "performer": [{ "@type": "MusicGroup", "name": "Keith Urban", "sameAs": "http://www.keithurban.net"}], www.keithurban.net/tour Linking datasets Same vocabulary
"location": { "@type": "Place", "name": "Sleep Train Amphitheatre", "address": {
"@type": "PostalAddress", "addressLocality": "Sacramento", "addressState": "CA", "addressCountry": "US" }}, "offers": [{ "@type: "Offer", "name": "TICKETS", "url": "http://www.keithurban.net/tour/420" }]} //... ] </script> Link is followed by crawler
{ "@context": "http://schema.org", "@type": "MusicEvent", // ... "offers": [{ "@type":
"Offer", "name": "General Tickets", "price": "40.00", "priceCurrency": "USD", "availability": "InStock", "validFrom": "2014-02-15T10:00", "category": "primary", "url": "www.axs.com/events/248328/keith-urban-tickets" }]} keithurban.net/tour/420 ……..
www.axs.com/events/248328/keith-urban-tickets
JSON-LD IN EMAIL
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "FlightReservation", "reservationNumber": "RXJ34P", "reservationStatus":
"http://schema.org/Confirmed", "underName": { "@type": "Person", "name": "Eva Green" }, "reservationFor": { "@type": "Flight", "flightNumber": "110", "airline": { "@type": "Airline", "name": "United" }, //... </script>
GMAIL https://developers.google.com/gmail/actions/reference/ fl ight-reservation?hl=pt-BR
OPEN GRAPH
None
None
TOOLS
SCHEMA.ORG
JSON-LD.ORG
g.co/StructuredData
http://www.google.com/webmasters/tools/richsnippets
STRUCTURED DATA MARKUP HELPER https://www.google.com/webmasters/markup-helper
https://www.google.com/webmasters/markup-tester/
None
Semantic annotation goes a looong way • +SEO • +Mobile
Rich Info • Applications we don’t even know yet
github.com/ globocom/ IWantToWorkAtGloboCom
icaromedeiros.com.br • Pelican (Python) • Use ReStructuredText (rst) or Markdown
• Generate static pages • Deploy to github pages easily • github.com/icaromedeiros/pelican-microdata
.. itemscope:: BusinessEvent :tag: p Today I have presented a
talk in :itemprop:`Salvador <location>` at :itemprop:`Front in Bahia <name>`.
<p itemscope itemtype="http://schema.org/BusinessEvent"> Today I have presented a talk in
<span itemprop="location">Salvador</span> at <span itemprop="name">Front in Bahia</span>. </p>
Ícaro Medeiros
[email protected]
Semantic team
[email protected]
globo.com slides icaromedeiros.com.br slideshare.net/icaromedeiros