View
652
Download
1
Category
Preview:
Citation preview
©2016 Eric Axel Franzon
Introduction to Semantic Web(Meets St. Patrick’s Day)
Eric FranzonSmart Data SEO
©2016 Eric Axel Franzon
Semantic Webis like the harmonica
©2016 Eric Axel Franzon
Easy to play; takes work to master.
©2016 Eric Axel Franzon
What we’ll discuss•What is Semantic Web?•Who’s using it?•What makes it work?•What can you do with it?
©2016 Eric Axel Franzon
What is Semantic Web?
• A Web-scale architecture• A metadata technology• A layer of meaning on the Web• In use TODAY!
©2016 Eric Axel Franzon
What is it not?• A software package
• Something that will ever be “done”
• A replacement for the current Web$19.99
©2016 Eric Axel Franzon
What is it not?• Limited to the public WWW
• A pipe dream
• A silver bullet
• HAL 9000 or Skynet $19.99
©2016 Eric Axel Franzon
• Globally• Inexpensively• In Real-Time
Behind the Firewall
(public)WorldWideWeb
HTTP
HTML
Based on W3C Standards
©2016 Eric Axel Franzon
• Globally• Inexpensively• In Real-Time
Behind the Firewall
SemanticWeb
RDF
SPARQL
OWL
Based on W3C Standards
©2016 Eric Axel Franzon
History…
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel FranzonIoT Enhancements by Eric Franzon
IoT
©2016 Eric Axel Franzon
• to connect DATA• to make information interpretable by machines
Semantic Web Standardsare used…
©2016 Eric Axel Franzon
Machine Interpretationas the Web Evolves…
©2016 Eric Axel Franzon
Web 1.0 – Linking Documents
©2016 Eric Axel Franzon
Web 1.0
“I see: characters + formatting + images” --my Computer
©2016 Eric Axel Franzon
Web 1.0 – Linking DocumentsWeb 2.0 – Linking People
©2016 Eric Axel Franzon
Web 2.0
“I see: characters + formatting + images” --my Computer
©2016 Eric Axel Franzon
It’s hard to interpret meaning when all you see are characters,
images, and formatting.
Context is critical.
©2016 Eric Axel Franzon
Web 1.0 – Linking DocumentsWeb 2.0 – Linking PeopleWeb 3.0 – Linking Data
©2016 Eric Axel Franzon
Web 3.0 – Linking DataTitle
Price
Format
Cover
Band“I see: things + relationships. This is about a collection of music.”
©2016 Eric Axel Franzon
Linking Open Data
©2016 Eric Axel Franzon
Linking Open Data ProjectMay, 2007
©2016 Eric Axel Franzon July 2009
©2016 Eric Axel Franzon
September 2011
©2016 Eric Axel Franzon
August 2014
©2016 Eric Axel Franzon
Data from these trusted sourcesis available for you
to use in your applications TODAY.
Data you can LINK to.
©2016 Eric Axel Franzon
Semantic Data that is machine READABLE.
…and machine INTERPRETABLE!
©2016 Eric Axel Franzon
Who’s Using Semantic Web Standards?
©2016 Eric Axel Franzon
• Healthcare / Life Sciences• Financial Services• Manufacturing / Retail• Marketing, Advertising• SEO/SEM• Libraries• Archives• Museums • Governments• Enterprise Software Vendors
Who’s Using Sem Web?
©2016 Eric Axel Franzon
Who’s Using Sem Web?
©2016 Eric Axel Franzon
Who’s Using Sem Web?
©2016 Eric Axel Franzon
Who’s Using Sem Web?
©2016 Eric Axel Franzon
What is schema.org?
“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”
©2016 Eric Axel Franzon
e.g. Product Markup
©2016 Eric Axel Franzon
What is schema.org?
“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”
©2016 Eric Axel Franzon
What it looks like
©2016 Eric Axel Franzon
What is schema.org?
“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”
©2016 Eric Axel Franzon
What it looks like
©2016 Eric Axel Franzon
e.g. TV Episode Markup
©2016 Eric Axel Franzon
What it looks like
©2016 Eric Axel Franzon
What it looks like
©2016 Eric Axel Franzon
What it looks like
©2016 Eric Axel Franzon
What makes SemWeb work?
©2016 Eric Axel Franzon
The Technologies of RDBMS
• Data• Schemas• Query Language
©2016 Eric Axel Franzon
RDBMS Datat_people
Name
City State
Post code
Sean Bozeman MT 59715Erika Missoula MT 59801
©2016 Eric Axel Franzon
RDBMS Schema
©2016 Eric Axel Franzon
RDBMS Query Language: SQL
SELECT isbn, title, price, price * 0.06 AS sales_tax FROM Book WHERE price > 100.00 ORDER BY title;
©2016 Eric Axel Franzon
The Technologies of SemWeb
• Data• Schemas• Query Language
©2016 Eric Axel Franzon
The Data Language
ResourceDescriptio
nFramewor
k
©2016 Eric Axel Franzon
“RDF is good for distributing dataacross the Web and pretendingit’s in one place.”-Dean Allemang, Author, Semantic Web for the Working Ontologist
©2016 Eric Axel Franzon
• to connect DATA• to make it interpretableby machines
RDF is used…
©2016 Eric Axel Franzon
1. By uniquely identifying THINGS2. By uniquely identifying
RELATIONSHIPS3. By using TRIPLES
Machine Interpretable - How?
(RDF is made up of triples!)
©2016 Eric Axel Franzon
So, what’s a THING?
1. By uniquely identifying THINGS
Machine Interpretable - How?
©2016 Eric Axel Franzon
A THING is anything that can be uniquely identified by a URI or a literal (string)
MeMy postal codeThe White HouseL.A. County’s sales tax rate
http://about.me/eric.franzon#mehttp://www.city-data.com/zips/59801.html
Lat: 38.89859 Long: -77.0359719.750 %
http://ericfranzon.com/harpcase.jpg
©2016 Eric Axel Franzon
This is a collection of THINGS:
t_peopleName
City State
Post code
Sean Bozeman MT 59715Erika Missoula MT 59801
©2016 Eric Axel Franzon
Who’s your daddy?
1. By uniquely identifying THINGS2. By uniquely identifying
RELATIONSHIPS
Machine Interpretable - How?
©2016 Eric Axel Franzon
Is Father of
<owl:ObjectProperty rdf:ID="isFather"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="#Person"/></owl:ObjectProperty>
http://ericaxel.com/eric.rdf#me ns:isFather
ns:isFather
SPOILER
ALERT!!
©2016 Eric Axel Franzon
1. By uniquely identifying THINGS2. By uniquely identifying
RELATIONSHIPS3. By using TRIPLES
What’s a triple?
Machine Interpretable - How?
©2016 Eric Axel Franzon
The Building block of RDF
The Triple
©2016 Eric Axel Franzon
Subject ObjectPredicate
Triples? It’s Elementary! (School)
song has title.
This a
Thing ThingRelationshipThat is a Triple!
©2016 Eric Axel Franzon
“This band recorded a song.”
“This recording is part of a collection.”
“This item has a barcode.”
“I like blues.”
“I like B.L.U.E.S.”
“This image can be used non-commercially.”
“My email address is eric@smartdataseo.com.”
Triples? It’s Elementary!
©2016 Eric Axel Franzon
Song
Author Wrote
Written by
Title
Has Title
Publisher
Has PublisherLyrics Has Lyrics
A Simple Graph
©2016 Eric Axel Franzon
Visualization of graph from Pharma space- Cytoscape.org
©2016 Eric Axel Franzon
Where does one store triples?
In a “triple store”• Native Semantic Web stores• RDBMS databases• As native files (.rdf)• Woven into documents (RDFa)• Generated on the fly
©2016 Eric Axel Franzon
Just so you know…There are many ways of representing RDF:
• RDF/XML• N3• JSON-LD
• N-Triples • Turtle• RDFa
Each has pros and cons, but they all connect THINGS and RELATIONSHIPS into TRIPLES
©2016 Eric Axel Franzon
The Technologies of SemWeb
• Data• Schemas• Query Language
©2016 Eric Axel Franzon
The Schemata
Linked Data schemas consist of:
Your RDF relationships (predicates)+
Relationship descriptions
©2016 Eric Axel Franzon
SemWeb Schemataid First Name Last Name
1 Tom Stockburger
SchemaData
Initial Schema
hasIDhasFirstName hasLastName
Tom Stockburger1
owl:sameAs
hasSurnameRelationship description
©2016 Eric Axel Franzon
1. Resource Description Framework Schema (RDFS): Simple, hierarchical classes
2. Simple Knowledge Organization System (SKOS): Port taxonomies to the Semantic Web
3. Web Ontology Language (OWL): Complex logical relationships
Relationship Descriptions
©2016 Eric Axel Franzon
Worldcat.org
• A project of the OCLC
©2016 Eric Axel Franzon
Vocabulary Combination “in the wild”
©2016 Eric Axel Franzon
Vocabulary Combination “in the wild”
©2016 Eric Axel Franzon
The Technologies of SemWeb
• Data• Schemas• Query Language(…or “What can you do with it?”)
©2016 Eric Axel Franzon
The query language
SPARQLProtocolAndRDFQueryLanguage
SPARQL
©2016 Eric Axel Franzon
SPARQL allows us to:• Pull values from structured & semi-structured data• Explore data by querying unknown relationships• Perform complex joins of disparate databases in a single, simple query• Transform RDF data from one vocabulary to another--Lee Feigenbaum, Cambridge Semantics
©2016 Eric Axel Franzon
Eric
©2016 Eric Axel Franzon
<hasDepiction>
Eric
©2016 Eric Axel Franzon
<hasLicense>
<hasDepiction>
Eric
©2016 Eric Axel Franzon
<hasLicense>
<hasDepiction>
<likes>
Eric
©2016 Eric Axel Franzon
<hasLicense>
<hasDepiction>
<likes>
<likes>
Eric
©2016 Eric Axel Franzon
<hasLicense>
<hasDepiction>
<likes>
<likes>
<likes>
Eric
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<wrote><hasDepiction>
<likes>
<likes>
<likes>
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<wrote>
<isAbout>
<hasDepiction>
<likes>
<likes>
<likes>
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<wrote>
<isAbout>
<hasDepiction>
<likes>
<likes>
<likes>
Eric
Ann<hasLicense>
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
Eric
Ann
©2016 Eric Axel Franzon
What can we ask of a system like this?
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
What does Eric Like?
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
What has a Creative Commons License?
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
What license does THIS document have?
Eric
Ann
©2016 Eric Axel Franzon
Chicago, Illinois
On the shores of Lake Michigan, Chicago is one of the major…
<hasLicense>
<hasLicense> <wrote>
<isAbout>
<livedIn>
<hasDepiction>
<likes>
<likes>
<likes>
What is liked by anyone who has lived somewhere
that is the subject of a document Ann has written?
Eric
Ann
©2016 Eric Axel Franzon
A quick note about database types…
©2016 Eric Axel Franzon
Trees and Tablest_people
Name City State Post codeBob Cat
Bozeman MT 59715
Monte Missoula MT 59801people
MonteBob Cat
Bozeman MT 59715
CityState Post
codeMissoula MT 59801
CityState Post
code
©2016 Eric Axel Franzon
Trees and Tables – Problem 1
t_peopleName City State Post
codeflag
Bob Cat
Bozeman MT 59715 1
Monte Missoula MT 59801people
MonteBob Cat
Bozeman MT 59715
CityState Post
codeMissoula MT 59801
CityState Post
code
flag1
Adding partial data totables leads to sparseness
©2016 Eric Axel Franzon
Trees and Tables – Problem 2
t_peopleName
City State
Post code
Monte
Missoula MT 59801
Erika Missoula MT 59801people
ErikaMonte
Missoula MT 59801
CityState Post
codeMissoula MT 59801
CityState Post
code
Common data leads to (lots!) of duplication
©2016 Eric Axel Franzon
Graphspeople
ErikaMonteCity
State
Postcode
Missoula
MT
59801
City
State
Postcode
flag1
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
SPARQL Queries
©2016 Eric Axel Franzon
SPARQL Example #1(specific endpoint – dbPedia)
Artists/Albums produced by PharrellPREFIX d: <http://dbpedia.org/ontology/>SELECT ?artistName ?albumNameWHERE { ?album d:producer :Pharrell_Williams . ?album d:musicalArtist ?artist . ?album rdfs:label ?albumName . ?artist rdfs:label ?artistName . FILTER ( lang(?artistName) = "en" ) FILTER (lang(?albumName) = "en" )}
©2016 Eric Axel Franzon
SPARQL Example #1
©2016 Eric Axel Franzon
SPARQL Example #1
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
SPARQL Example #2(specific endpoint – dbPedia)
Musical artists who were born in or have a hometown in Irelandand the acts they performed with.
©2016 Eric Axel Franzon
SPARQL Example #2(specific endpoint – dbPedia)
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?name ?person ?artist WHERE { ?person foaf:name ?name . ?person rdf:type <http://dbpedia.org/ontology/MusicalArtist> . ?person <http://dbpedia.org/ontology/associatedMusicalArtist> ?artist . { ?person dbo:hometown <http://dbpedia.org/resource/Republic_of_Ireland> . } UNION { ?person dbo:birthPlace <http://dbpedia.org/resource/Republic_of_Ireland> . }}ORDER BY ?name
©2016 Eric Axel Franzon
SPARQL Example #2
©2016 Eric Axel Franzon
SPARQL Example #2
A major retailer ran this query…
associated it with the catalog of albums it sells…
and delivered a set of recommended purchases for St. Patrick’s Day!
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
• Show me all landlocked countries• With populations > 50,000• Display the country names in English• Eliminate duplicates
PREFIX type: <http://dbpedia.org/class/yago/>PREFIX prop: <http://dbpedia.org/property/>SELECT ?country_name ?populationWHERE { ?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 15000000 && langMatches(lang(?country_name), "EN")) .} ORDER BY DESC(?population)
SPARQL Query #3
©2016 Eric Axel Franzon
SPARQL Query #3 Results
©2016 Eric Axel Franzon
• Show me all landlocked countries• With populations > 50,000• Display the country names in English• Eliminate duplicates
PREFIX type: <http://dbpedia.org/class/yago/>PREFIX prop: <http://dbpedia.org/property/>SELECT ?country_name ?populationWHERE { ?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 15000000 && langMatches(lang(?country_name), "RU")) .} ORDER BY DESC(?population)
SPARQL Query #3
Russian
©2016 Eric Axel Franzon
SPARQL Query #3 Results
©2016 Eric Axel Franzon
• 8 KB text file with the .rdf extension• Hosted on my website• Information on me, my interests, and people I know
My FOAF Profile
©2016 Eric Axel Franzon
SPARQL Example #4(generic endpoint)
FOAF (some people that Eric Franzon knows) PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?nameFROM <http://ericaxel.com/eric.rdf>WHERE { ?knower foaf:knows ?known . ?known foaf:name ?name .}
©2016 Eric Axel Franzon
SPARQL Example #4
©2016 Eric Axel Franzon
Example #4 - Results
©2016 Eric Axel Franzon
2 Disparate Data Sources:2 FOAF Profiles
©2016 Eric Axel Franzon
SPARQL Example #5Querying two FOAF Profiles
PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>SELECT ?nameFROM <http://ericaxel.com/eric.rdf>FROM <http://bosatsu.net/foaf/brian.rdf>WHERE { ?x rdf:type foaf:Person . ?x foaf:name ?name .}
©2016 Eric Axel Franzon
Where’s the Data?
What’sThe
Question?
©2016 Eric Axel Franzon
Example #5 - Results
©2016 Eric Axel Franzon
Another Benefit of querying Linked Data…
Data link to other data!
SPARQL Example #6
©2016 Eric Axel Franzon
1. Find these pieces of information:• Episode number• Airdate • Guest star • Chalkboard gag • Couch gag
2. Order them by Episode number
SPARQL Example #6
©2016 Eric Axel Franzon
Bart Simpson's Linked Data (DBPedia)
SELECT ?epnum ?airdate ?guest_star ?chalkboard_gag ?couch_gag WHERE { ?s dbpedia2:airdate ?airdate . ?s dbpedia2:blackboard ?chalkboard_gag . ?s dbpedia2:guestStar ?guest_star . ?s dbpedia2:episodeNo ?epnum . ?s dbpedia2:couchGag ?couch_gag . } order by ?epnum
SPARQL Example #6
©2016 Eric Axel Franzon
SPARQL Example #6
©2016 Eric Axel Franzon
Example #6 - Results
©2016 Eric Axel Franzon
Following the Trail…
©2016 Eric Axel Franzon
Following the Trail…
©2016 Eric Axel Franzon
Following the Trail…
©2016 Eric Axel Franzon
Following the Trail…
©2016 Eric Axel Franzon
And that is how you get from The Simpsons to the
London School of Economics.
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
Wikidata
©2016 Eric Axel Franzon
One More Thing…
©2016 Eric Axel Franzon
A little bit can be powerful!
©2016 Eric Axel Franzon
Questions? Operators are standing by.
THANK YOU!
eric@smartdataseo.com@EricAxel http://linkedin.com/in/ericfranzonhttps://plus.google.com/+EricFranzon
©2016 Eric Axel Franzon
©2016 Eric Axel Franzon
Resourceshttps://flic.kr/p/6krdsMhttps://flic.kr/p/p9jiDKhttps://flic.kr/p/3q8afLhttps://flic.kr/p/brJs4Ghttps://flic.kr/p/78rsTchttps://flic.kr/p/bpSeR2https://flic.kr/p/pQcWQthttps://flic.kr/p/daKwMLhttps://flic.kr/p/8bpMhFhttp://www.flickr.com/photos/dawnmanser/3532853278/http://www.flickr.com/photos/artolog/3983764041/http://www.flickr.com/photos/97964364@N00/59780745/http://www.flickr.com/photos/starwarsblog/http://aldobucchi.comhttp://www.addletters.com/pictures/bart-simpson-generator/3024046.htmhttp://richard.cyganiak.de/2007/10/lod/
Recommended