resource description framework building the semantic web
DESCRIPTION
Resource Description Framework Building the Semantic Web. CS 502 – 20020226 Carl Lagoze – Cornell University. Acknowledgements: Eric Miller Dieter Fensel. Illustration is a type of contribution. M. Doe illustrated the book “Best Stories”. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/1.jpg)
Cornell CS 502
Resource Description FrameworkBuilding the Semantic Web
CS 502 – 20020226Carl Lagoze – Cornell University
Acknowledgements:Eric MillerDieter Fensel
![Page 2: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/2.jpg)
Cornell CS 502
Motivating the “Semantic Web”
M. Doe illustrated the book “Best
Stories”Mary Doe
animated the cartoon “Best Stories – the
movie”
Illustration is a type of
contribution
animation is a type of
contribution
M. Doe and Mary Doe are
pseudonyms forSusan Mann
Show me the works to which Susan
Mann contributed?
Cartoons and Books are types
of Works
![Page 3: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/3.jpg)
Cornell CS 502
Modeling & Encoding Metadata Components: RDF
• RDF (Resource Description Format)• The instantiation of the Warwick Framework on
the Web– Support for and integration of multiple independent
metadata vocabularies
• Provides enabling technology for richly-structured metadata
• Rich data model supporting notions of distinct entities and properties
• Primitives permit semantic inferencing • Expressible in machine readable manner (e.g.,
XML)
![Page 4: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/4.jpg)
Cornell CS 502
RDF Components
• Formal data model• Syntax for interchange of data• Schema Type system (schema model)• Syntax for machine-understandable schemas• Query and profile protocols
• Ontologies layered on top
![Page 5: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/5.jpg)
Cornell CS 502
RDF Data Model
• Imposes structural constraints on the expression of application data models– for consistent encoding, exchange and processing of
metadata– Provides for structural interoperability
• Enables resource description communities to define their own semantics
![Page 6: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/6.jpg)
Cornell CS 502
RDF Data Model
• Directed labeled graphs• Model elements
– Resource– Property– Value– Statement– Containers
![Page 7: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/7.jpg)
Cornell CS 502
RDF Model Primitives
ResourceProperty
ValueResource
Statement
![Page 8: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/8.jpg)
Cornell CS 502
Simple Example
ResourceAuthor
“Eric”
![Page 9: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/9.jpg)
Cornell CS 502
RDF Syntax
• RDF Model defines a formal relationships among resources, properties and values
• Syntax is required to...– Store instances of the model into files– Communicate files from one application to another
• XML is one well-supported syntax• There are syntax alternatives
– Relational databases– Triple Stores
![Page 10: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/10.jpg)
Cornell CS 502
RDF Model Example #1
URI:R“CIMI Presentation”
Title
Creatordc:
dc:
“Eric Miller”
![Page 11: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/11.jpg)
Cornell CS 502
RDF Syntax Example #1
URI:R“CIMI Presentation”
Title
Creatordc:
dc:
“Eric Miller”
<RDF xmlns = “http://www.w3.org/TR/WD-rdf-syntax#” xmlns:dc = “http://purl.org/dc/elements/1.0/”> <Description about = “URI:R”> <dc:Title> CIMI Presentation </dc:Title> <dc:Creator> Eric Miller </dc:Creator> </Description></RDF>
![Page 12: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/12.jpg)
Cornell CS 502
“Eric Miller”
RDF Model Example #2
URI:R
URI:ERIC
“[email protected]”“Eric Miller”
“OCLC”
bib:Emailbib:Affbib:Name
URI:OCLC
“CIMI Presentation”Title
Creatoroa:
dc:
![Page 13: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/13.jpg)
Cornell CS 502
<RDF xmlns = “http://www.w3.org/TR/WD-rdf-syntax#” xmlns:dc = “http://purl.org/dc/elements/1.0/” xmlns:bib = “http://www.bib.org/persons#”> <Description about = “URI:R”> <dc:Title> CIMI Presentation </dc:Title> <oa:Creator> <Description> <bib:Name> Eric Miller </bib:Name> <bib:Email> [email protected] </bib:Email> <bib:Aff resource = “http://www.oclc.org” /> </Description> </oa:Creator> </Description></RDF>
RDF Syntax Example #2
![Page 14: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/14.jpg)
Cornell CS 502
“Eric Miller”
RDF Model Example #3
URI:R
URI:ERIC
“[email protected]”“Eric Miller”
“OCLC”
bib:Emailbib:Affbib:Name
URI:OCLC
“CIMI Presentation”Title
Creator admin:By
admin:On
“LOC”
“03-09-99”
admin:For“...”
dc:
dc:
![Page 15: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/15.jpg)
Cornell CS 502
RDF Containers
• Permit the aggregation of several values for a property
• Express multiple aggregation semantics– unordered– sequential or priority order– alternative
![Page 16: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/16.jpg)
Cornell CS 502
RDF Containers
• Permit the aggregation of several values for a property
• Express multiple aggregation semantics– unordered– sequential or priority order– alternative
![Page 17: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/17.jpg)
Cornell CS 502
RDF Containers
• Bag– unordered grouping
• Sequence– ordered grouping
• Alternatives– alternate values
• need to choose
– at least one value– first value is default or preferred value
![Page 18: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/18.jpg)
Cornell CS 502
RDF - Bag
• Unordered group• “Carl Lagoze and Stuart Weibel are co-authors”
<BIB:Author> <Bag> <li> Carl Lagoze </li> <li> Stuart Weibel </li></Bag></BIB:Author>
![Page 19: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/19.jpg)
Cornell CS 502
RDF - Sequence
• Ordered or priority group• “Carl Lagoze is primary author and Stuart Weibel is
second author”
<BIB:Author> <Seq> <li> Carl Lagoze </li> <li> Stuart Weibel </li></Seq></BIB:Author>
![Page 20: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/20.jpg)
Cornell CS 502
RDF - Alt
• Client chooses one of several values• First value is default• “The distance is 15 kilometers or 9.3 miles”
<DC:Coverage> <Alt> <li> 15KM </li> <li> 9.3M </li></Alt></DC:Coverage>
![Page 21: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/21.jpg)
Cornell CS 502
Formalizing the RDF model – Thinking in triples
• RDF basic types– rdf:Resource – everything that can be identified (with
a URI)– rdf:Property – specialization of a resource expressing
a binary relation between two resources– rdf:statement – a triple with properties rdf:subject,
rdf:predicate, rdf:object
• An RDF statement is a triple consisting of a resource (subject), a property and a second resource (object)– (:s :p :o)
• Expressible also as binary relations– P(S,O) – e.g., Title(R, “War & Peace”)
![Page 22: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/22.jpg)
Cornell CS 502
RDF triple model
![Page 23: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/23.jpg)
Cornell CS 502
RDF statements and basic types
WYA
creator
DigitalLibraries
rdf:s
ubje
ct
rdf:p
red
icate
rdf:object
rdf:statement
rdf:property
“CL says ‘WYA wrote Digital Libraries’”
![Page 24: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/24.jpg)
Cornell CS 502
Reification – Statements about statements
“CL says ‘WYA wrote Digital Libraries’”
WYA
creator
DigitalLibraries
rdf:s
ubje
ct
rdf:p
red
icate
rdf:object
rdf:statement
rdf:property
CLassertedBy
![Page 25: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/25.jpg)
Cornell CS 502
From Graphs to Triples
alice
betty
charles
doris
eve
![Page 26: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/26.jpg)
Cornell CS 502
Expressing Collection Primitives in Binary Relations
![Page 27: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/27.jpg)
Cornell CS 502
RDF Schemas
• Declaration of vocabularies– properties defined by a particular community– characteristics of properties and/or constraints on
corresponding values
• Schema Type System - Basic Types– Property, Class, SubClassOf, Domain, Range– Minimal (but extensible) at this time– Expressible in the RDF model and syntax
![Page 28: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/28.jpg)
Cornell CS 502
Schema Vocabularies
• Enables communities to share machine readable tokens and locally define human readable labels.
dc:Creator“Nom”rdfs:label
“Author”rdfs:label
“$100 $a”
rdfs:label
![Page 29: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/29.jpg)
Cornell CS 502
Relationships among vocabularies
dc:Creator
ms:director
marc:100
bib:Author
![Page 30: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/30.jpg)
Cornell CS 502
Relationships among vocabulary elements
URI:R “John Smith”ms:director
dc:Creatorms:director
rdfs:subPropertyOf
rdfs:label“Director”
dc:Creator
![Page 31: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/31.jpg)
Cornell CS 502
RDF Schema: Specializing Properties
• rdfs:subPropertyOf – allows specialization of relations– E.g., the property “father” is a subPropertyOf the
property parent
• subProperty semantics
![Page 32: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/32.jpg)
Cornell CS 502
Sub-Property Semantics
![Page 33: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/33.jpg)
Cornell CS 502
Constraints on Properties
• Force objects to be of a certain type• rdfs:domain
– Restricts the type of resources that may have a specific property
• rdfs:range– Restricts the type of resources that may be the value
of a specific property
![Page 34: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/34.jpg)
Cornell CS 502
Inferences from Constraints
![Page 35: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/35.jpg)
Cornell CS 502
Class Hierarchy
• rdfs:Class– Resources denoting a set of resources; range of
rdf:type
• rdfs:subClassOf– Create class hierarchy
rdf:type rdf:typerdfs:class
rdfs:subClassOf
rdf:type
rdf:class
rdf:type
rdf:class
![Page 36: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/36.jpg)
Cornell CS 502
Sub-Class Inferencing
![Page 37: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/37.jpg)
Cornell CS 502
Sub-class Inferencing Example
![Page 38: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/38.jpg)
Cornell CS 502
Storing and querying RDF models – Relational DB
• Issues– Scalability: potentially huge # of triples– Tables: number, sparseness, joins– Queries: how and how expensive– Reification?
![Page 39: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/39.jpg)
Cornell CS 502
Storing and querying RDF models – SQUISH
SELECT ?sal, ?t, ?x FROM http://ilrt.org/discovery/2000/11/rss-query/jobs-rss.rdf, http://ilrt.org/discovery/2000/11/rss-query/jobs.rss WHERE (job::advertises ?x ?y) (job::salary ?y ?sal) (job::title ?y ?t) AND ?sal > 55000 USING job for http://ilrt.org/discovery/2000/11/rss-query/jobvocab.rdf#
http://swordfish.rdfweb.org:8085/rdfquery/index.html
![Page 40: Resource Description Framework Building the Semantic Web](https://reader036.vdocuments.us/reader036/viewer/2022062409/56814f5f550346895dbd13cc/html5/thumbnails/40.jpg)
Cornell CS 502
Where do you stop?
• Model provides enabling technology• Degree of metadata simplicity/complexity is a matter of:
– Resource description communities needs, best-practice and experience
– Organization/Institution’s Policy– Economics– Goals and requirements of implementation