creating semantic mashups bridging web 2 0 and the semantic web presentation 1
TRANSCRIPT
![Page 1: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/1.jpg)
Jamie Taylor, Colin Evans, Toby Segaran
Creating Semantic Mashups:
Bridging Web 2.0 and the Semantic Web
![Page 2: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/2.jpg)
Why is Semantic Data Interesting?
![Page 3: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/3.jpg)
Why is Semantic Data Interesting?
•Walmart demo
![Page 4: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/4.jpg)
Why is Semantic Data Interesting?
•Walmart demo• http://blog.kiwitobes.com/?p=51
![Page 5: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/5.jpg)
Why is Semantic Data Interesting?
•Walmart demo• http://blog.kiwitobes.com/?p=51
•Political Query
![Page 6: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/6.jpg)
Why is Semantic Data Interesting?
•Walmart demo• http://blog.kiwitobes.com/?p=51
•Political Query• http://www.freebase.com/view/guid/9202a8c04000641f8000000008053940
![Page 7: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/7.jpg)
Why is Semantic Data Interesting?
•Walmart demo• http://blog.kiwitobes.com/?p=51
•Political Query• http://www.freebase.com/view/guid/9202a8c04000641f8000000008053940
•Venture Spin
![Page 8: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/8.jpg)
Why is Semantic Data Interesting?
•Walmart demo• http://blog.kiwitobes.com/?p=51
•Political Query• http://www.freebase.com/view/guid/9202a8c04000641f8000000008053940
•Venture Spin• http://www.perlgoddess.com/FreeSpin/FreeSpin.swf
![Page 9: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/9.jpg)
Semantic Data is Flexible Data
• The data for these demos all used structured semantics
• The data was not specifically designed for the demo
• The demos can utilize any data set with shared semantics (e.g., Venture Spin)
![Page 10: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/10.jpg)
Overview
![Page 11: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/11.jpg)
Overview
•Introduction to semantic ideas
![Page 12: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/12.jpg)
Overview
•Introduction to semantic ideas
•Technologies and Architectural techniques
![Page 13: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/13.jpg)
Overview
•Introduction to semantic ideas
•Technologies and Architectural techniques
•Build something now looking to the Future
![Page 14: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/14.jpg)
Goals
![Page 15: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/15.jpg)
Goals•Enough to get you started with semantic technologies
![Page 16: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/16.jpg)
Goals•Enough to get you started with semantic technologies
•Understand advantages and issues with semantic architectures
![Page 17: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/17.jpg)
Goals•Enough to get you started with semantic technologies
•Understand advantages and issues with semantic architectures
•Basic understanding of semantic representation
![Page 18: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/18.jpg)
Goals•Enough to get you started with semantic technologies
•Understand advantages and issues with semantic architectures
•Basic understanding of semantic representation
•Ability to use basic semantic repository
![Page 19: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/19.jpg)
Goals•Enough to get you started with semantic technologies
•Understand advantages and issues with semantic architectures
•Basic understanding of semantic representation
•Ability to use basic semantic repository
•Working overview of a semantic system
![Page 20: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/20.jpg)
Semantics: Why do we care?
As web developers we want to:
• Increase the utility of our applications
e.g., help users get stuff done
• Build applications with greater efficiency
![Page 21: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/21.jpg)
Web 1.0Web 1.0
•Single function applications•Publishing large private databases
![Page 22: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/22.jpg)
Web 1.0: Stovepipes
Diner and a Movie
![Page 23: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/23.jpg)
Web 1.0: Stovepipes
• Data is in silos
• No information sharing except in the user’s head
• The end user drives system and data integration
...usually through “copy & paste”
![Page 24: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/24.jpg)
Web 2.0Web 2.0
•Leverage silos of content
•User-generated content
•Open APIs facilitate mash-ups
•The “Social Web”
![Page 25: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/25.jpg)
Web 2.0: UI Mashups
![Page 26: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/26.jpg)
Web 2.0: UI Mashups
• Mash-ups only allow shallow integration at the UI
• Data is still in silos
• User-generated content is also in silosData doesn’t stray far from its point of creation
![Page 27: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/27.jpg)
Today
• Even with open APIs and mash-ups, users still do most of the system integration
• With the proliferation of user-generated content, system integration is more important than ever!
• Data, whether user-generated, or proprietary, is not easily accessible or transferable
• We’re still fighting with stovepipe systems
![Page 28: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/28.jpg)
History of Web Integration
Point of Integration
Users’ BrainWeb 1.0
![Page 29: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/29.jpg)
History of Web Integration
Point of Integration
Users’ BrainWeb 1.0
UI (Mash-up)Web 2.0
![Page 30: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/30.jpg)
History of Web Integration
Point of Integration
Users’ BrainWeb 1.0
UI (Mash-up)Web 2.0
Semantic Mash-ups
![Page 31: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/31.jpg)
Integration Scaling
Utility increase as number of sources increases
Web 2.0 Mashup
Users benefit as more data is made available in application
![Page 32: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/32.jpg)
Integration ScalingWeb 2.0 Mashup
Integration effort grows with number of sources
Easy to integrate first few sources,
but complexity increases as number of sources increases
![Page 33: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/33.jpg)
Integration ScalingSemantic Mashup
Treat sources uniformly
Pay a slightly higher start-up cost, but quickly benefit.
Note: red line is should somewhat sloping up :-)
![Page 34: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/34.jpg)
Why Semantics
![Page 35: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/35.jpg)
Why Semantics
•Developing Content is expensive
![Page 36: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/36.jpg)
Why Semantics
•Developing Content is expensive
•Developing Web applications is expensive
![Page 37: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/37.jpg)
Why Semantics
•Developing Content is expensive
•Developing Web applications is expensive
•Use existing systems/sources where possible
![Page 38: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/38.jpg)
Cracking the Stovepipe
• Semantics facilitate shared meaning through
• Subject Identity
• Strong Semantics
• Open APIS + Open Data
• These principles make it much easier to combine stovepipe systems and integrate data
![Page 39: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/39.jpg)
Creating Meaning
Ridley Scott directed Blade Runner
![Page 40: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/40.jpg)
Creating Meaning
Ridley Scott directed Blade Runner
subject
![Page 41: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/41.jpg)
Creating Meaning
Ridley Scott directed Blade Runner
subject predicate
![Page 42: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/42.jpg)
Creating Meaning
Ridley Scott directed Blade Runner
subject predicate object
![Page 43: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/43.jpg)
Creating Meaning
![Page 44: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/44.jpg)
Creating Meaning
RidleyScott
![Page 45: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/45.jpg)
Creating Meaning
RidleyScott
directed
![Page 46: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/46.jpg)
Creating Meaning
RidleyScott
BladeRunner
directed
![Page 47: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/47.jpg)
Creating Meaning
RidleyScott
BladeRunner
directed
subject predicate object
![Page 48: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/48.jpg)
Using Shared Meaning
myRDF = new RDF()t1 = new Triple('A', 'geo', '37.44, -122.14')t2 = new Triple('B', 'company', 'Wal-mart')myRDF.addTriples([t1, t2])
http://rdflib.net/
Creating Triples in Javascript:
![Page 49: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/49.jpg)
Using Shared Meaning
http://rdflib.net/http://kiwitobes.com/maptest/
![Page 50: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/50.jpg)
Using Shared Meaningfunction businessindustry(store) { at=store.Match(null,null,'industry',null) for (i=0;i<at.length;i++) { subject=at[i].subject industry=at[i].object
query=[{'type':'/business/company', 'name':null, 'industry':industry}] Metaweb.read(query, function(r) { t=[] for (i=0;i<r.length;i++) { t.push(new Triple(subject,
'company',r[i].name,'','','en')) } store.addTriples(t) }) }}
Example of a service (Freebase):
![Page 51: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/51.jpg)
Using Shared MeaningExample of a service (Upcoming):
function eventsearch(store) { at=store.Match(null,null,'event',null) for (i=0;i<at.length;i++) { subject=at[i].subject event=at[i].object var request = new XMLHttpRequest(); request.open("GET", 'upcomingread.php?query='+event, true); request.onreadystatechange = function() { if (request.readyState == 4) { var items = request.responseXML.getElementsByTagName("event"); t=[] for (j=0;j<items.length;j++) { address=items[j].getAttribute('venue_address')+', '+ items[j].getAttribute('venue_city')+', '+ items[j].getAttribute('venue_state_code')+' '+ items[j].getAttribute('venue_zip') t.push(new Triple(subject,'address',address)) } store.addTriples(t) }
}; request.send(null); }}
![Page 52: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/52.jpg)
Identifying Shared Meaning
![Page 53: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/53.jpg)
The Meaning of “is” ishttp://dbpedia.org/resource/IS
![Page 54: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/54.jpg)
The Meaning of “is” is
•URI’s provide strong references
http://dbpedia.org/resource/IS
![Page 55: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/55.jpg)
The Meaning of “is” is
•URI’s provide strong references
•Much like pointing in the physical world
http://dbpedia.org/resource/IS
![Page 56: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/56.jpg)
The Meaning of “is” is
•URI’s provide strong references
•Much like pointing in the physical world
“this is red”
http://dbpedia.org/resource/IS
![Page 57: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/57.jpg)
The Meaning of “is” is
•URI’s provide strong references
•Much like pointing in the physical world
“this is red”“this is a pen”
http://dbpedia.org/resource/IS
![Page 58: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/58.jpg)
The Meaning of “is” is
•URI’s provide strong references
•Much like pointing in the physical world
“this is red”“this is a pen”
•a URIref is an unambiguous pointer to something of meaning
http://dbpedia.org/resource/IS
![Page 59: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/59.jpg)
Creating Meaning
http://...blade_runner
http://...ridley_scott
![Page 60: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/60.jpg)
Creating Meaning
http://...blade_runner
http://...ridley_scott
![Page 61: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/61.jpg)
Creating Meaning
http://...directedhttp://...
blade_runnerhttp://...
ridley_scott
![Page 62: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/62.jpg)
Creating Meaning
http://...directedhttp://...
blade_runnerhttp://...
ridley_scott
![Page 63: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/63.jpg)
Creating Meaning
http://...directed
subject predicate object
http://...blade_runner
http://...ridley_scott
![Page 64: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/64.jpg)
Creating Meaning
fb = Namespace("http://www.freebase.com/view/en/")graph.add(( fb("blade_runner"), fb("directed_by"), fb("ridley_scott") )
![Page 65: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/65.jpg)
Two Types of URIrefs
![Page 66: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/66.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
![Page 67: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/67.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner
![Page 68: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/68.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner•Ridley Scott
![Page 69: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/69.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner•Ridley Scott
•Movies
![Page 70: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/70.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner•Ridley Scott
•Movies•Relations (predicates)
![Page 71: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/71.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner•Ridley Scott
•Movies•Relations (predicates)
•directed by
![Page 72: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/72.jpg)
Two Types of URIrefs
•Things/states (subjects, objects)
•Blade Runner•Ridley Scott
•Movies•Relations (predicates)
•directed by•acted in
![Page 73: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/73.jpg)
Graph Data Models
![Page 74: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/74.jpg)
Graph Data Models
name
"Blade Runner"
![Page 75: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/75.jpg)
Graph Data Models
"Blade Runner"
release date
Jun 25, 1982name
![Page 76: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/76.jpg)
Graph Data Models
"Blade Runner"
release date
1981
"Harrison Ford"actor
name
![Page 77: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/77.jpg)
"Blade Runner"
release date
Jun 25, 1982
"Harrison Ford"actor
name
name
Graph Data Models
![Page 78: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/78.jpg)
Graph Data Models
"Blade Runner"
release date
Jun 25, 1982
"Harrison Ford"actor
name
name
Jul 13, 1942
birth
date
![Page 79: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/79.jpg)
Graph Data Modelsfrom rdflib import *
fb = Namespace("http://www.freebase.com/view/en/")graph = ConjunctiveGraph()
br = fb("blade_runner")graph.add((br, fb("name"), Literal(“Blade Runner”))graph.add((br, fb("release_date"), Literal(“Jun 25, 1982”))
hf = fb(“harrison_ford”)graph.add((hf, fb("name"), Literal(“Harrison Ford”))graph.add((hf, fb("birth_date"), Literal(“Jul 13, 1942”))
graph.add((br, fb("actor"), hf))
![Page 80: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/80.jpg)
Graph Integration
![Page 81: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/81.jpg)
Graph Integration
E
D
C
B
A
![Page 82: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/82.jpg)
Graph Integration
A
B
C
EF
E
D
C
B
A
![Page 83: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/83.jpg)
Graph Integration
A
B
C
EF
E
D
C
B
A
![Page 84: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/84.jpg)
Graph Integration
A
B
C
EF
E
D
C
B
A
![Page 85: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/85.jpg)
W3C Vision
Tim Berners-Lee’s Giant Global Graph
![Page 86: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/86.jpg)
Stack Attack: Semantic Web
taken from http://www.w3.org/2007/Talks/0130-sb-W3CTechSemWeb/layerCake-4.png
![Page 87: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/87.jpg)
Stack Attack: J2EE
![Page 88: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/88.jpg)
Take What You Need
taken from http://www.w3.org/2007/Talks/0130-sb-W3CTechSemWeb/layerCake-4.png
![Page 89: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/89.jpg)
Take What You Need
taken from http://www.w3.org/2007/Talks/0130-sb-W3CTechSemWeb/layerCake-4.png
![Page 90: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/90.jpg)
Linked Open Data
•Web of Open Data (“global graph”)
•Expressed in RDF
•Lack of ontological agreement
•how many ways are there to express lat/lon?!
•Canonical references are problematic
•Closest thing we have to the Semantic Web
...more like a test bed
![Page 91: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/91.jpg)
TabulatorBrowsing the Global Graph
http://dig.csail.mit.edu/2005/ajar/ajaw/data#Tabulator
![Page 92: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/92.jpg)
Open Data
http://demo.openlibrary.org/dev/docs/data
http://theinfo.org/
http://theinfo.org/get/dataR Data
![Page 93: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/93.jpg)
Just Enough RDFDon’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 94: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/94.jpg)
Just Enough RDF
•RDF is a Data Model
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 95: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/95.jpg)
Just Enough RDF
•RDF is a Data Model
•A very simple model!
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 96: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/96.jpg)
Just Enough RDF
•RDF is a Data Model
•A very simple model!•RDF has many (inconvenient) serializations
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 97: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/97.jpg)
Just Enough RDF
•RDF is a Data Model
•A very simple model!•RDF has many (inconvenient) serializations
•RDF-XML
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 98: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/98.jpg)
Just Enough RDF
•RDF is a Data Model
•A very simple model!•RDF has many (inconvenient) serializations
•RDF-XML•N3
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 99: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/99.jpg)
Just Enough RDF
•RDF is a Data Model
•A very simple model!•RDF has many (inconvenient) serializations
•RDF-XML•N3
•Turtle
Don’t get caught up in the serial representation - any RDF library will take care of that for you transparently.
Focus on the data model
![Page 100: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/100.jpg)
RDF Data Model
• Nodes (“Subjects”)
• connect via Links (“Predicates”)
• to Objects
• either Nodes or Literals
![Page 101: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/101.jpg)
RDF Data Model
• Nodes are referenced by URIs (http://foo/bar/)
• Links are referenced by URIs
• Literals are text strings, sometimes with a URI type and a language attached
• Literal types typically are XML Schema URIs (examples)
![Page 102: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/102.jpg)
RDF Data Model
• RDF is typically expressed in statements or triples
• Triples are composed of a node, a link, and either another node or a literal
• <http://www.w3.org/People/Berners-Lee/card#i>
<http://www.w3.org/2000/01/rdf-schema#label>
“Tim Berners-Lee”
![Page 103: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/103.jpg)
RDF Graphs
• RDF triples are typically grouped into graphs
• Graph Query
• Triple (s, p, o)
• Graph query languages (RDQL, SPARQL)
![Page 104: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/104.jpg)
Query Graphfrom rdflib import *
fb = Namespace("http://www.freebase.com/view/en/")
graph = ConjunctiveGraph()
starredin = fb["starred_in"]
graph.add((fb["carrie_fisher"], starredin, fb["star_wars"]))
graph.add((fb["harrison_ford"], starredin, fb["star_wars"]))
graph.add((fb["harrison_ford"], starredin, fb["blade_runner"]))
graph.add((fb["daryl_hannah"], starredin, fb["blade_runner"]))
![Page 105: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/105.jpg)
Triple Query
for triple in graph.triples((None, starredin, fb["star_wars"])): print triple
for subject in graph.subjects(predicate=starredin, object=fb["star_wars"]): print subject
![Page 106: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/106.jpg)
SPARQL QuerySELECT ?costar WHERE {
fb:carrie_fisher fb:starred_in ?movie .
?actor fb:starred_in ?movie .
?actor fb:starred_in ?othermovie .
?costar fb:starred_in ?othermovie .
FILTER (?othermovie != ?movie && ?actor != ?costar)
}
![Page 107: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/107.jpg)
RDFLib SPARQL Query
print list(graph.query(
"""SELECT ?costar WHERE {
fb:carrie_fisher fb:starred_in ?movie .
?actor fb:starred_in ?movie .
?actor fb:starred_in ?othermovie .
?costar fb:starred_in ?othermovie .
FILTER (?othermovie != ?movie && ?actor != ?costar)
} """,
initNs=dict(fb=Namespace("http://www.freebase.com/view/en/"))))
![Page 108: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/108.jpg)
μformats•Semantics embedded in display markup (XHTML)•Strong (predefined) semantics•Each μformat defines an “ontology”
<div class="hreview"> <span><span class="rating">5</span> out of 5 stars</span> <h4 class="summary">Crepes on Cole is awesome</h4> <span class="reviewer vcard">Reviewer: <span class="fn">Tantek</span> - <abbr class="dtreviewed" title="20050418T2300-0700">April 18, 2005</abbr></span> <div class="description item vcard"><p> <span class="fn org">Crepes on Cole</span> is one of the best little creperies in <span class="adr"><span class="locality">San Francisco</span></span>. Excellent food and service. Plenty of tables in a variety of sizes for parties large and small. </p></div> <p>Visit date: <span>April 2005</span></p> <p>Food eaten: <span>Florentine crepe</span></p></div>
WP identifies 22 distinct places called San Francisco in the world
![Page 109: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/109.jpg)
RDFa•Yet another RDF serialization•Like μformats, embeddable in HTML•Like RDF high expressability + extensibility•Like any RDF serialization, you don’t want to create them by hand!
<p xmlns:dc="http://purl.org/dc/elements/1.1/" about="http://www.example.com/books/wikinomics"> In his latest book <cite property="dc:title">Wikinomics</cite>, <span property="dc:author">Don Tapscott</span> explains deep changes in technology, demographics and business. The book is due to be published in <span property="dc:date" content="2006-10-01">October 2006</span>.</p>
![Page 110: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/110.jpg)
What I mean by Ontology
![Page 111: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/111.jpg)
What I mean by Ontology
Ontology:
![Page 112: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/112.jpg)
What I mean by Ontology
Ontology:An explicit specification of a conceptualization
![Page 113: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/113.jpg)
What I mean by Ontology
Ontology:An explicit specification of a conceptualization
Conceptualization:
![Page 114: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/114.jpg)
What I mean by Ontology
Ontology:An explicit specification of a conceptualization
Conceptualization: Abstract, simplified view of the world that we wish to represent for some purpose
![Page 115: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/115.jpg)
What I mean by Ontology
Ontology:An explicit specification of a conceptualization
Conceptualization: Abstract, simplified view of the world that we wish to represent for some purpose
![Page 116: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/116.jpg)
Ontology
![Page 117: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/117.jpg)
OntologyIS NOT:
![Page 118: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/118.jpg)
OntologyIS NOT:
• Magic
![Page 119: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/119.jpg)
OntologyIS NOT:
• Magic
• Universal
![Page 120: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/120.jpg)
OntologyIS NOT:
• Magic
• Universal
• Change the world
![Page 121: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/121.jpg)
OntologyIS:IS NOT:
• Magic
• Universal
• Change the world
![Page 122: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/122.jpg)
OntologyIS:
• An artifactIS NOT:
• Magic
• Universal
• Change the world
![Page 123: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/123.jpg)
OntologyIS:
• An artifact
• An API
IS NOT:
• Magic
• Universal
• Change the world
![Page 124: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/124.jpg)
OntologyIS:
• An artifact
• An API
• A Social Contract
IS NOT:
• Magic
• Universal
• Change the world
![Page 125: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/125.jpg)
Movie Ontology
movie
name
release_date
imdb_rating
rt_rating
![Page 126: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/126.jpg)
Movie Ontology
movie
name
release_date
imdb_rating name
actor
actor
rt_rating
![Page 127: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/127.jpg)
Movie Ontology
movie
name
release_date
imdb_rating name
actor
actor
showtheater
name
address
showing
time
rt_rating
showing
![Page 128: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/128.jpg)
Ontology Declarationfrom rdflib import *
fbCommon = Namespace("http://www.freebase.com/view/common/")oName = fbCommon["object/name"]oType = fbCommon["object/type"]
fbPeople = Namespace("http://www.freebase.com/view/people/")personType = fbPeople["person"]pPhoto = fbPeople["person/photo"]
fbFilm = Namespace("http://www.freebase.com/view/film/")filmType = fbFilm["film"]fImdbId = fbFilm["film/imdb_id"]fImdbRating = fbFilm["film/imdb_rating"]fRtRating = fbFilm["film/rt_rating"]fActor = fbFilm["film/actor"]
theaterType = fbFilm["theater"]tAddress = fbFilm["theater/address"]tShowing = fbFilm["theater/showing"]
showingType = fbFilm["showing"]sTime = fbFilm["showing/time"]
fbDining = Namespace("http://www.freebase.com/view/dining/")restaurantType = fbDining["restaurant"]rAddress = fbFilm["restaurant/address"]
![Page 129: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/129.jpg)
What is Freebase?
• Structured Database
• Strong Collaboratively Edited Subjects
• Strong Collaboratively Developed Semantics
• Open API + Open Data
![Page 130: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/130.jpg)
What’s in Freebase?
• Over 3.3 million subjects
• ~750,000 people
• ~450,000 locations
• ~50,000 companies
• ~40,000 movies
• Over 1000 types and 3000 properties
![Page 132: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/132.jpg)
![Page 133: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/133.jpg)
Freebase Data Model
![Page 134: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/134.jpg)
Freebase Data Model
![Page 135: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/135.jpg)
MQL
•JSON structure
•Schemas (ontologies) form object abstraction
•Query by exampleFill in the parts you knowResult fills in the rest
![Page 136: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/136.jpg)
MQL
•JSON structure
•Schemas (ontologies) form object abstraction
•Query by exampleFill in the parts you knowResult fills in the rest
Show me the IMDB links for filmsby George Lucas:
[{ "name" : null, "imdb_id" : [ ], "initial_release_date":null,
"directed_by":"George Lucas", "type" : "/film/film" }]
![Page 137: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/137.jpg)
MQL
Carrie Fisherʼs Costars:
[{ "film" : [{ "film" : { "name" : null, "starring" : [{
"actor" : null }] } }], "id" : "/en/carrie_fisher", "type" : "/film/actor" }]
StarWars
CarrieFisher
filmfilm starringactor
performance
PrincessLeia
character
[ { "film" : [ { "film" : { "name" : null, "starring" : [ { "actor" : { "film" : [ { "film" : { "name" : null, "starring" : [ { "actor" : { "name" : null }, "limit" : 2 } ] }, "limit" : 2 } ], "name" : null }, "limit" : 2 } ] }, "limit" : 2 } ], "id" : "/en/carrie_fisher", "type" : "/film/actor" }]
![Page 138: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/138.jpg)
A Semantic ArchitectureSemantic Architecture
•A little knowledge... ...goes a long way
•Leverage Silos of Content•Effort ∝ semantic coverage
![Page 139: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/139.jpg)
A Semantic ArchitectureSemantic Architecture
Semantic Mapping Layer
![Page 140: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/140.jpg)
A Semantic ArchitectureSemantic Architecture
Semantic Plugin Layer
Semantic Mash-up Layer
![Page 141: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/141.jpg)
Film Mashup
• Strong Identity through IMDB IDs
• Pulls data from:
• IMDB (movie & actor data & rating)
• Rotten Tomatoes (rating)
• Freebase (pictures & restaurants)
• Fandango (movie theaters)
![Page 142: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/142.jpg)
Movie Ontology
movie
name
release_date
imdb_rating name
actor
actor
showtheater
name
address
showing
time
rt_rating
showing
![Page 143: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/143.jpg)
MIT SIMILE
http://www.cse.msu.edu/~dunham/exhibit/top100.html
![Page 144: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/144.jpg)
MIT SIMILE
http://www.cse.msu.edu/~dunham/exhibit/top100.html
![Page 145: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/145.jpg)
MIT SIMILE
http://www.cse.msu.edu/~dunham/exhibit/top100.html
![Page 146: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/146.jpg)
MIT SIMILE
http://www.cse.msu.edu/~dunham/exhibit/top100.html
![Page 147: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/147.jpg)
MIT SIMILE
http://www.cse.msu.edu/~dunham/exhibit/top100.html
![Page 148: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/148.jpg)
Useful Places
• Freebase/MQL:
• http://www.freebase.com/
• Javascript RDF Library (used in Toby’s map demo)
• http://www.jibbering.com/rdf-parser/
• LIBrdf (Python)
• http://rdflib.net/
• MIT Semantic Visualization Widgets
• http://simile.mit.edu/
![Page 149: Creating Semantic Mashups Bridging Web 2 0 And The Semantic Web Presentation 1](https://reader034.vdocuments.us/reader034/viewer/2022052618/554cdb41b4c905cc488b4e3b/html5/thumbnails/149.jpg)
Useful Places
• SPARQL:
• http://www.w3.org/TR/rdf-sparql-query/
• Linked Open Data/Semantic Web Interest Group (SWIG)
• http://www.w3.org/2001/sw/interest/
• http://www.w3.org/DesignIssues/LinkedData.html
• Tabulator (Linked Open Data Browser):
• http://www.w3.org/2005/ajar/tab