Title: RDF Resource Description Framework
1RDF ResourceDescription Framework
Una piattaforma inferenziale per il Web
Semantico Jena2 Roma, 2006 Web Semantico
- M. Missikoff F. Taglino
- LEKS, IASI-CNR
2Summary
- Motivations
- RDF knowledge model
- RDF(S) modelling notions
- XML/RDF, an XML syntax for RDF(S)
- Using RDF for inferring knowledge
- Extending RDF(S) OWL
- Conclusions
3Motivations
- Semantic Web Information needs to be processed
by applications, rather than being only displayed
to people (e.g., like with HTML) - Common convention about semantics, syntax, and
structure required - Define a language for representing meta-data,
with a semantic flavor
4What is RDF?
- The Resource Description Framework is a
- Flexible language for representing knowledge over
the web - It models conceptual knowledge (schemas) and
factual knowledge (data) - Enables the encoding, exchange, and reuse of
structured knowledge about defined entities
(identified by URI) - Enables data interoperability through the design
of mechanisms that support common conventions of
semantics, syntax, and structure. - The
- W3C Recommendation
- http//www.w3.org/TR/rdf-syntax-grammar/
5URI - Uniform Resource Identifier
- Used to identify items on the Web
- Anyone can create a URI
- A URI can be associated to anything
- Network-accessible things, e.g., electronic
document, image, service, - Not network-accessible things, e.g., human
beings, corporation, book, car, - Abstract concepts, e.g., creator, member,
- Uniform Resource Locator (URL) one form of URI
e.g., http//www.w3.org
6RDF (Meta)Model
- Knowledge is represented as collections of Triples
resource (subject)
property (predicate)
value (object)
- Resource thing that can be identified on the
Web - Property specific aspect, characteristic,
attribute, or relation used to describe a
resource - Value - Propertys value resource or literal
- Connecting triples together we can represent a
graph
7RDF abstract (graph) representation
mary
has_sister
john
27
has_age
type
john
Person
subClassOf
Student
Prof
8Statement (triple)
- The following sentence
- http//www.example.org/index.html has creator
whose_value_is John Smith - Can be expressed by an RDF statement having
- Subject http//www.example.org/index.html
- Predicate http//purl.org/dc/creator
- Object John Smith
9Basic RDF Model - example
- http//www.example.org/index.html has creator
whose value is John Smith
http//www.example.org/ index.html
http//purl.org/dc/creator
John Smith
resource (subject)
property (predicate)
value (object)
RDF Statement
Please Note when the object is a Literal it is
represented by a BOX
10RDF Schema
- The purpose is to define an XML vocabulary to
- Denote classes (subclasses) and their
relationships - Define properties and associate them with classes
- The benefit is that
- Data are modeled according to schema (as usual in
DB) - inferencing on data, and enhanced searching are
facilitated - http//www.w3.org/TR/rdf-schema/
11Knowledge model of RDF(S)
RDF(S) Meta-model
property
Class
range
Application specific schema (RDF(S) Model)
has_age
Person
Int
Application specific actual data (RDF Instances)
has_age
23
John
12RDF(S) modelling notions
- The following RDF(S) modelling notions are
presented - Schema definition useful for defining new
vocabularies (i.e., names of classes, of
attributes, ) - Utility additional notions useful to enrich the
entity definiton - Label and Comment
- Complex Structures, e.g., Container
- Synonyms
- Note we will present a simplified version of
RDF(S). In particular, reification will be
omitted
13Schema definition (RDFS vocabulary)
- rdfsClass
- Set of resources
- rdfssubClassOf
- For defining specialisation among Classes
- rdfsdomain and rdfsrange
- Constraints on properties definition
- rdfssubProperty
- For defining specialisation among Properties
- rdfProperty
- Borrowed from RDF (ground), but used at schema
level
14rdfsClass
- Class is a resource denoting a set of resources
(instances) - Examples
- Person
- River
Person
rdfsClass
River
ltrdfsClass rdfIDRiver/gt ltrdfsClass
rdfIDPerson/gt
15rdfssubClassOf Example
NaturallyOccurringWaterSource
rdfssubClassOf
BodyOfWater
Stream
Lake
Ocean
Sea
Brook
River
Tributary
- ltrdfsClass rdfIDNaturallyOccurringWaterSource
/gt - ltrdfsClass rdfIDBodyOfWater/gt
- ltrdfssubClassOf rdfresourceNaturallyOccurr
ingWaterSource/gt - lt/rdfsClassgt
- ltrdfsClass rdfIDStreamgt
- ltrdfssubClassOf rdfresourceNaturallyOccurr
ingWaterSource/gt - lt/rdfsClassgt
- ltrdfsClass rdfIDRivergt
- ltrdfssubClassOf rdfresourceStream/gt
- lt/rdfsClassgt
16rdfssubClassOf Properties
- Allows specialisation hierarchy among Classes to
be defined - Multiple subClassOf properties may be specified
- Transitive (i.e., any River is a
NaturallyOccurringWaterSource too)
17Definition of a Property at intensional level
rdfsdomain and rdfsrange
- Used to define properties at intentional level
- rdfsdomain, restricts the set of resources that
may have a given property - rdfsrange, restricts the set of valid values for
a property. - A property may have multiple domain, and more
than one range
18Example of definition of a Property at
intensional level (1)
A River has a name expressed as a Literal
rdfsClass
River
rdfsdomain
rdfProperty
hasName
Class representing literals (strings)
rdfsLiteral
rdfsrange
- ltrdfsClass rdfIDRiver/gt
- ltrdfProperty rdfIDhasNamegt
- ltrdfsdomain rdfresourceRiver/gt
- ltrdfsrange rdfresourcehttp//www.w3.org/200
0/01/rdfschemaLiteral/gt - lt/rdfPropertygt
19Example of definition of a Property at
intensional level (2)
rdfsClass
River
rdfsdomain
rdfProperty
emptiesInto
rdfsClass
BodyOfWater
rdfsrange
- ltrdfProperty rdfIDemptiesIntogt
- ltrdfsdomain rdfresourceRiver/gt
- ltrdfsrange rdfresourceBodyOfWater/gt
- lt/rdfPropertygt
20rdfssubPropertyOf
- Allows specialisation hierararchy among
properties to be defined - Multiple subPropertyOf properties for the same
property can be specified
21Example of a subProperty definition
The hasMother property is a sub property of the
hasParent property
rdfsdomain
rdfProperty
rdfsClass
Person
hasParent
rdfssubPropertyOf
rdfsrange
hasMother
rdfProperty
- ltrdfProperty rdfIDhasParentgt
- ltrdfsdomain rdfresourcePerson/gt
- ltrdfsrange rdfresourcePerson/gt
- lt/rdfProperty gt
- ltrdfProperty rdfIDhasMothergt
- ltrdfssubPropertyOf rdfresourcehasParent/gt
- lt/rdfPropertygt
22Class instance definitionrdftype
- Instances are defined through the rdftype
property
The Yangtze is an instance of the River Class
rdftype
Yangtze
River
ltrdfDescription rdfIDYangtzegt ltrdftype
rdfresourceRiver/gt lt/rdfDescriptiongt
23Utility notions
- rdfslabel and rdfscomment
- For describing resources with human readable text
- rdfsContainer
- Collections of resources
- rdfsseeAlso and rdfsisDefinedBy
- For referring to alternative descriptions of
resources
24rdfslabel and rdfscomment
- Describe a resource with human readable text in
addition to pure RDF properties - rdfslabel, to assign a human readable name to a
resource - rdfscomment, to give a longer natural language
description to a resource
Yangtze
rdfslabel
http//www.china.org/geography/ rivers/Yangtze
The biggest Chinese river
rdfscomment
ltrdfDescription rdfIDhttp//www.china.org/geog
raphy/rivers/Yangtzegt ltrdfslabelgtYangtzelt/rdf
slabelgt ltrdfscommentgtThe biggest Chinese
riverlt/rdfscommentgt lt/rdfPropertygt
25Summary of RDF(S) modeling constructs
- rdfsClass and rdftype
- rdfssubClassOf
- rdfsdomain and rdfsrange
- rdfssubProperty and rdfproperty
- rdfslabel and rdfscomment
- rdfsContainer
- rdfsseeAlso and rdfsisDefinedBy
- rdfResource (the generic entity)
- rdfID (when the entity is first introduced)
- rdfabout (when the entity is referred to)
- rdfDescription
26How RDF can be implemented
- Diagrammatic representation is an Abstract Syntax
- Several Concrete Sintaxes usually RDF/XML syntax
- However, other notations possible
- e.g., Notation3 (N3)
- ltpatgt ltlovesgt ltjoegt
- lthttp//xyz.org/agt lthttp//xyz.org/bgt
lthttp//xyz.org/cgt - lthttp//xyz.org/Seangt lthttp//xyz.org/namegt
Sean - RDF/XML Abreviated syntax
Note the symbol is a separator between the
Prefix and the resource ID
27Using RDF(S) for Ontologies and Inferencing
28An extract of an RDF ontology
- lt?xml version1.0/gt
- ltrdfRDF xmlnsrdfhttp//www.w3.org/1999/02/22-r
df-syntax-ns - xmlnsrdfshttp//www.w3.org/2000/
01/rdf-schema - xmlbasehttp//www.geodesy.org/wa
ter/naturally-occurringgt - ltrdfsClass rdfIDNaturallyOccurringWaterSource
/gt - ltrdfsClass rdfIDBodyOfWater/gt
- ltrdfssubClassOf rdfresourceNaturallyOccur
ringWaterSource/gt - lt/rdfsClassgt
- ltrdfsClass rdfIDStreamgt
- ltrdfssubClassOf rdfresourceNaturallyOccur
ringWaterSource/gt - lt/rdfsClassgt
- ltrdfsClass rdfIDRivergt
- ltrdfssubClassOf rdfresourceStream/gt
- lt/rdfsClassgt
- ltrdfProperty rdfIDemptiesIntogt
- ltrdfsdomain rdfresourceRiver/gt
- ltrdfsrange rdfresourceBodyOfWater/gt
- lt/rdfPropertygt
- ltrdfProperty rdfIDlengthgt
29What inferences can be made?
NaturallyOccurringWaterSource
rdfssubClassOf
Inference Engine
BodyOfWater
Stream
Brook
River
Tributary
Lake
Ocean
Sea
- length Literal - emptiesInto BodyOfWater
ltRiver rdfIDhttp//www.china.org/geography/rive
rs/Yangtze xmlnsrdfhttp//www.w3.org/1999/02
/22-rdf-syntax-ns xmlnshttp//www.geodesy.o
rg/rivergt ltlenghtgt6300 kilometerslt/lenghtgt ltem
ptiesInto rdfresourcehttp//www.china.org/EastC
hinaSea/gt lt/Rivergt
Inferences - Yangtze is a Stream - Yangtze is
a NaturallyOccurringWaterSource -
http//www.china.org/EastChinaSea is a BodyOfWater
30How does a taxonomy facilitate searching?
NaturallyOccurringWaterSource
rdfssubClassOf
BodyOfWater
Stream
Brook
River
Tributary
Lake
Ocean
Sea
Inference Engine
- length Literal - emptiesInto BodyOfWater
Show me all the documents that contain info
about streams
ltRiver rdfIDhttp//www.china.org/geography/rive
rs/Yangtze xmlnsrdfhttp//www.w3.org/1999/02
/22-rdf-syntax-ns xmlnshttp//www.geodesy.o
rg/rivergt ltlenghtgt6300 kilometerslt/lenghtgt ltem
ptiesInto rdfresourcehttp//www.china.org/EastC
hinaSea/gt lt/Rivergt
Results - Yangtze is a Stream, so this document
is relevant to the query
31Desire more expressiveness
- Two classes, same concept
- Equivalent classes Airplane and Plane
- Cardinality constraints
- Ocean has one maxDepth
OWL
RDF Schema Building Block to more expressive
Ontology Languages like OWL
RDF(S)
32OWL (Ontology Web Language)
- Provides three increasingly expressive languages
- OWL Full maximum expressiveness with no
computational guarantees - OWL DL, expressiveness of Description Logics
without losing computational completeness - OWL Lite, simple constraint features. E.g.,
cardinality constraints
OWL Full
OWL DL
OWL Lite
33Rules
- Allows for derivations, by introducing a
special binary predicate - logimplies gt
- Subject and Object are RDF triples, called
formulae - Derivation (n3 syntax)
- X parent Y brother Z gt Z uncle Y
34Conclusions
- RDF has potential to make web contents machine
readable - RDF describes resources and anything can be seen
as a Resources - RDF(S) comprises vocabulary for describing also
the intentional level - Several serializations (i.e., RDF/XML, N3)
- Suitable for applying inference
- Limited features (i.e., no cardinality
constraints) - OWL for a more expressiveness
35Sources
- http//www.w3.org/TR/rdf-primer/
- http//www.w3.org/TR/rdf-syntax-grammar/
- http//www.w3.org/TR/rdf-schema/
- P.A. Champin, RDF Tutorial - http//www710.univ-ly
on1.fr/champin/rdf-tutorial/rdf-tutorial.pdf - A. Wilk, RDF(S) - www.ida.liu.se/labs/iislab/cours
es/LW/slides/RDFS.pdf
36Qualche esercizio rapido
- Rappresentare in RDF alcune frasi di linguaggio
naturale - Ugo ama Anna
- Il treno parte alle 1040
- Il treno è partito in ritardo
- Le auto vecchie inquinano
- Il corso di Knowledge Extraction è interessante
- La prima domenica del mese cè il mercatino in
Piazza Dante
37Passaggio a RDF/Diagramma
Persona
RdfssubClassOf
Studente
rdftype
Exama
ExUgo
ExAnna