the semantic web #7 - rdf semantics

29
Linked Data & Semantic Web Technology The Semantic Web Part 7. RDF Semantics Dr. Myungjin Lee

Upload: myungjin-lee

Post on 08-May-2015

669 views

Category:

Technology


4 download

DESCRIPTION

This is a lecture note #7 for my class of Graduate School of Yonsei University, Korea. It describes RDF Semantics.

TRANSCRIPT

Page 1: The Semantic Web #7 - RDF Semantics

Linked Data &Semantic WebTechnology

The Semantic WebPart 7. RDF Semantics

Dr. Myungjin Lee

Page 2: The Semantic Web #7 - RDF Semantics

2Linked Data & Semantic Web Technology

RDF

• RDF– an assertional language intended to be used to express propositions us-

ing precise formal vocabularies– to provide a basic foundation for more advanced assertional languages – to emphasize generality and precision in expressing propositions about

any topic

Page 3: The Semantic Web #7 - RDF Semantics

3Linked Data & Semantic Web Technology

Semantics

• What is Semantics?– the study of meaning focused on the relation between signifiers, like

words, phrases, signs, and symbols, and what they stand for

• Syntax and Semantics– Syntax

• character strings without meaning

– Semantics• meaning of the character strings

• Why we need semantics for RDF(S)– to share equally interpretable meaning from RDF(S) syntax

Page 4: The Semantic Web #7 - RDF Semantics

4Linked Data & Semantic Web Technology

Model Theory

• What is Model Theory?– a formal semantic theory which relates expressions to interpretations– If a model for a language satisfies a particular sentence or theory, it is called a

model of the sentence or theory.

World Interpretation

Daisy isA Cow

Cow kindOf Animal

Mary isA Person

Person kindOf Animal

Z123ABC isA Car

{<a,b>,…}

a

b

Model

Mary drives Z123ABC

Page 5: The Semantic Web #7 - RDF Semantics

5Linked Data & Semantic Web Technology

Terms

• interpretation– an interpretation is a world with each symbol and each expression as-

signed an extension

• model– an model of a logic theory is an interpretation of the theory that satisfies

all constraints specified by the theory

• consistency– a logic theory is consistent if it has a model

• satisfiability– a symbol or expression x is satisfiable if it is possible to find a model of K

that makes x true

• entailment– a logic theory K entails another logical theory K’ if every model of K is a

model of K’

Page 6: The Semantic Web #7 - RDF Semantics

6Linked Data & Semantic Web Technology

Logical Consequence (Entailment)

• logical consequence– if an RDFS document contains

– then

u rdf:type ex:Textbook. ex:Textbook rdfs:subClassOf ex:Book.

u rdf:type ex:Book. It is deduced (deduction)or inferred (inference).

modelsof p1

modelsof p3

modelsof p2

interpretations

p1 p2 p3

logicalentailment

propositions (statements)ㅠ

Page 7: The Semantic Web #7 - RDF Semantics

7Linked Data & Semantic Web Technology

RDF Semantics

• RDF Semantics– a basic technique called model theory for specifying the semantics of a

formal language• the language refers to a 'world‘

– the minimal conditions that a world must satisfy in order to assign an appropriate meaning for every expression in the language

• a particular word an interpretation• model theory ‘interpretation theory’

– defined as a mapping on the abstract syntax of RDF described in the RDF concepts and abstract syntax

RDFS-interpretation

RDF-interpretation

simple interpretation

Page 8: The Semantic Web #7 - RDF Semantics

8Linked Data & Semantic Web Technology

Graph Definitions

• RDF graph, simply graph– a set of RDF triples

• a subgraph of an RDF graph– a subset of the triples in the graph

• a ground RDF graph– one with no blank nodes

• a name– a URI reference of a literal

• a vocabulary– a set of names

• the vocabulary of a graph– the set of names which occur as the subject, predicate, or object of any

triple in the graph

Page 9: The Semantic Web #7 - RDF Semantics

9Linked Data & Semantic Web Technology

Definition of a Simple Interpretation

• A simple interpretation I of a vocabulary V is defined by:

1. A non-empty set IR of resources, called the domain or universe of I.

2. A set IP, called the set of properties of I.

3. A mapping IEXT from IP into the powerset of IR x IR i.e. the set of sets of pairs <x,y> with x and y in IR .

4. A mapping IS from URI references in V into (IR union IP)

5. A mapping IL from typed literals in V into IR.

6. A distinguished subset LV of IR, called the set of literal values, which contains all the plain literals in V

Page 10: The Semantic Web #7 - RDF Semantics

10Linked Data & Semantic Web Technology

Semantic Conditions for Ground Graphs

• if E is a plain literal "aaa" in V then I(E) = aaa

• if E is a plain literal "aaa"@ttt in V then I(E) = <aaa, ttt>

• if E is a typed literal in V then I(E) = IL(E)

• if E is a URI reference in V then I(E) = IS(E)

Page 11: The Semantic Web #7 - RDF Semantics

11Linked Data & Semantic Web Technology

Semantic Conditions for Ground Graphs

• if E is a ground triple s p o. then I(E) = true if s, p and o are in V, I(p) is in IP and <I(s),I(o)> is in IEXT(I(p)) otherwise I(E)= false.

• if E is a ground RDF graph then I(E) = false if I(E') = false for some triple E' in E, otherwise I(E) =true.

Page 12: The Semantic Web #7 - RDF Semantics

12Linked Data & Semantic Web Technology

Simple Entailment between RDF graphs

• a set S of RDF graphs (simply) entails a graph E if every interpretation which satisfies every member of S also satisfies E

• Lemma– Empty Graph Lemma.

• The empty set of triples is entailed by any graph, and does not entail any graph except it -self.

– Subgraph Lemma.• A graph entails all its subgraphs.

– Instance Lemma.• A graph is entailed by any of its instances.

– Merging lemma.• The merge of a set S of RDF graphs is entailed by S, and entails every member of S.

– Interpolation Lemma.– Anonymity lemma.– Monotonicity Lemma.– Compactness Lemma.

Page 13: The Semantic Web #7 - RDF Semantics

13Linked Data & Semantic Web Technology

RDF Interpretations

• RDF vocabulary– The RDF vocabulary, rdfV, is a set of URI references in the rdf:

namespace

• RDF axiomatic triples

rdf:type rdf:type rdf:Property .rdf:subject rdf:type rdf:Property .rdf:predicate rdf:type rdf:Property .rdf:object rdf:type rdf:Property .rdf:first rdf:type rdf:Property .rdf:rest rdf:type rdf:Property .rdf:value rdf:type rdf:Property .rdf:_1 rdf:type rdf:Property .rdf:_2 rdf:type rdf:Property .... rdf:nil rdf:type rdf:List .

rdf:type rdf:Property rdf:XMLLiteral rdf:nil rdf:List rdf:Statement rdf:subject rdf:predicate rdf:object rdf:first rdf:rest rdf:Seq rdf:Bag rdf:Alt rdf:_1 rdf:_2 ... rdf:value

Page 14: The Semantic Web #7 - RDF Semantics

14Linked Data & Semantic Web Technology

RDF Semantic Conditions

• x is in IP if and only if <x, I(rdf:Property)> is in IEXT(I(rdf:type))

• If "xxx"^^rdf:XMLLiteral is in V and xxx is a well-typed XML literal string, then

IL("xxx"^^rdf:XMLLiteral) is the XML value of xxx;

IL("xxx"^^rdf:XMLLiteral) is in LV;

IEXT(I(rdf:type)) contains

<IL("xxx"^^rdf:XMLLiteral), I(rdf:XMLLiteral)>

• If "xxx"^^rdf:XMLLiteral is in V and xxx is an ill-typed XML literal string, then

IL("xxx"^^rdf:XMLLiteral) is not in LV;

IEXT(I(rdf:type)) does not contain

<IL("xxx"^^rdf:XMLLiteral), I(rdf:XMLLiteral)>

Page 15: The Semantic Web #7 - RDF Semantics

15Linked Data & Semantic Web Technology

RDF Entailments

• S rdf-entails E when every rdf-interpretation which satisfies ev-ery member of S also satisfies E

Page 16: The Semantic Web #7 - RDF Semantics

16Linked Data & Semantic Web Technology

RDFS Interpretations

• RDFS vocabulary– RDF Schema extends RDF to include a larger vocabulary rdfsV with

more complex semantic constraints

rdfs:domain rdfs:range rdfs:Resource rdfs:Literal rdfs:Datatype rdfs:Class rdfs:subClassOf rdfs:subPropertyOf rdfs:member rdfs:Container rdfs:ContainerMembershipProperty rdfs:comment rdfs:seeAlso rdfs:isDefinedBy rdfs:label

Page 17: The Semantic Web #7 - RDF Semantics

17Linked Data & Semantic Web Technology

RDFS Semantic Conditions

• x is in ICEXT(y) if and only if <x,y> is in IEXT(I(rdf:type))

IC = ICEXT(I(rdfs:Class))

IR = ICEXT(I(rdfs:Resource))

LV = ICEXT(I(rdfs:Literal))

• If <x,y> is in IEXT(I(rdfs:domain)) and <u,v> is in IEXT(x) then

u is in ICEXT(y)

• If <x,y> is in IEXT(I(rdfs:range)) and <u,v> is in IEXT(x) then

v is in ICEXT(y)

• IEXT(I(rdfs:subPropertyOf)) is transitive and reflexive on IP

• If <x,y> is in IEXT(I(rdfs:subPropertyOf)) then

x and y are in IP and IEXT(x) is a subset of IEXT(y)

Page 18: The Semantic Web #7 - RDF Semantics

18Linked Data & Semantic Web Technology

RDFS Semantic Conditions

• If x is in IC then

<x, I(rdfs:Resource)> is in IEXT(I(rdfs:subClassOf))

• If <x,y> is in IEXT(I(rdfs:subClassOf)) then

x and y are in IC and ICEXT(x) is a subset of ICEXT(y)

• IEXT(I(rdfs:subClassOf)) is transitive and reflexive on IC

• If x is in ICEXT(I(rdfs:ContainerMembershipProperty)) then:

<x, I(rdfs:member)> is in IEXT(I(rdfs:subPropertyOf))

• If x is in ICEXT(I(rdfs:Datatype)) then

<x, I(rdfs:Literal)> is in IEXT(I(rdfs:subClassOf))

Page 19: The Semantic Web #7 - RDF Semantics

19Linked Data & Semantic Web Technology

RDFS Axiomatic Triples

rdf:type rdfs:domain rdfs:Resource .rdfs:domain rdfs:domain rdf:Property .rdfs:range rdfs:domain rdf:Property .rdfs:subPropertyOf rdfs:domain rdf:Property .rdfs:subClassOf rdfs:domain rdfs:Class .rdf:subject rdfs:domain rdf:Statement .rdf:predicate rdfs:domain rdf:Statement .rdf:object rdfs:domain rdf:Statement .rdfs:member rdfs:domain rdfs:Resource . rdf:first rdfs:domain rdf:List .rdf:rest rdfs:domain rdf:List .rdfs:seeAlso rdfs:domain rdfs:Resource .rdfs:isDefinedBy rdfs:domain rdfs:Resource .rdfs:comment rdfs:domain rdfs:Resource .rdfs:label rdfs:domain rdfs:Resource .rdf:value rdfs:domain rdfs:Resource .

rdf:type rdfs:range rdfs:Class .rdfs:domain rdfs:range rdfs:Class .rdfs:range rdfs:range rdfs:Class .rdfs:subPropertyOf rdfs:range rdf:Property .rdfs:subClassOf rdfs:range rdfs:Class .rdf:subject rdfs:range rdfs:Resource .rdf:predicate rdfs:range rdfs:Resource .rdf:object rdfs:range rdfs:Resource .

rdfs:member rdfs:range rdfs:Resource .rdf:first rdfs:range rdfs:Resource .rdf:rest rdfs:range rdf:List .rdfs:seeAlso rdfs:range rdfs:Resource .rdfs:isDefinedBy rdfs:range rdfs:Resource .rdfs:comment rdfs:range rdfs:Literal .rdfs:label rdfs:range rdfs:Literal .rdf:value rdfs:range rdfs:Resource .rdf:Alt rdfs:subClassOf rdfs:Container .rdf:Bag rdfs:subClassOf rdfs:Container .rdf:Seq rdfs:subClassOf rdfs:Container .rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property .

rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso .

rdf:XMLLiteral rdf:type rdfs:Datatype .rdf:XMLLiteral rdfs:subClassOf rdfs:Literal . rdfs:Datatype rdfs:subClassOf rdfs:Class .

rdf:_1 rdf:type rdfs:ContainerMembershipProperty .rdf:_1 rdfs:domain rdfs:Resource .rdf:_1 rdfs:range rdfs:Resource . rdf:_2 rdf:type rdfs:ContainerMembershipProperty .rdf:_2 rdfs:domain rdfs:Resource .rdf:_2 rdfs:range rdfs:Resource . ...

Page 20: The Semantic Web #7 - RDF Semantics

20Linked Data & Semantic Web Technology

Some Triples which are RDFS-Valid

rdfs:Resource rdf:type rdfs:Class . rdfs:Class rdf:type rdfs:Class . rdfs:Literal rdf:type rdfs:Class . rdf:XMLLiteral rdf:type rdfs:Class . rdfs:Datatype rdf:type rdfs:Class . rdf:Seq rdf:type rdfs:Class . rdf:Bag rdf:type rdfs:Class . rdf:Alt rdf:type rdfs:Class . rdfs:Container rdf:type rdfs:Class . rdf:List rdf:type rdfs:Class . rdfs:ContainerMembershipProperty rdf:type rdfs:Class . rdf:Property rdf:type rdfs:Class . rdf:Statement rdf:type rdfs:Class .

rdfs:domain rdf:type rdf:Property . rdfs:range rdf:type rdf:Property . rdfs:subPropertyOf rdf:type rdf:Property . rdfs:subClassOf rdf:type rdf:Property . rdfs:member rdf:type rdf:Property . rdfs:seeAlso rdf:type rdf:Property . rdfs:isDefinedBy rdf:type rdf:Property . rdfs:comment rdf:type rdf:Property . rdfs:label rdf:type rdf:Property .

Page 21: The Semantic Web #7 - RDF Semantics

21Linked Data & Semantic Web Technology

Extensional Semantic Conditions

• <x,y> is in IEXT(I(rdfs:subClassOf)) if and only if

x and y are in IC and ICEXT(x) is a subset of ICEXT(y)

• <x,y> is in IEXT(I(rdfs:subPropertyOf)) if and only if

x and y are in IP and IEXT(x) is a subset of IEXT(y)

• <x,y> is in IEXT(I(rdfs:range)) if and only if

(if <u,v> is in IEXT(x) then v is in ICEXT(y))

• <x,y> is in IEXT(I(rdfs:domain)) if and only if

(if <u,v> is in IEXT(x) then u is in ICEXT(y))

Page 22: The Semantic Web #7 - RDF Semantics

22Linked Data & Semantic Web Technology

RDFS Entailments

• S rdfs-entails E when every rdfs-interpretation which satisfies every member of S also satisfies E– since every rdfs-interpretation is an rdf-interpretation, if S rdfs-entails E

then it rdf-entails E– rdfs-entailment is stronger than rdf-entailment

Page 23: The Semantic Web #7 - RDF Semantics

23Linked Data & Semantic Web Technology

Entailment Rules

• What is Entailment Rules?– some inference patterns which capture some of the various forms of vo-

cabulary entailment used as a guide for the design of software to check RDF graphs for RDF and RDFS entailment

– to add a consequent triple to a graph when it contains triples conforming to a pattern

• a graph entails any larger graph that is obtained by applying the rules to the original graph

• Conventions– aaa, bbb, etc., stand for any URI reference– uuu, vvv, etc. for any URI reference or blank node identifier– xxx, yyy etc. for any URI reference, blank node identifier or literal– lll for any literal– _:nnn, etc., for blank node identifiers

Page 24: The Semantic Web #7 - RDF Semantics

24Linked Data & Semantic Web Technology

Simple Entailment Rules

• Simple Entailment Rules

• Literal Generalization Rule

• Literal Instantiation Rule

Rule Name if E contains then add

se1 uuu aaa xxx .uuu aaa _:nnn .where _:nnn identifies a blank node allocated to xxx by rule se1 or se2.

se2 uuu aaa xxx ._:nnn aaa xxx .where _:nnn identifies a blank node allocated to uuu by rule se1 or se2.

Rule Name if E contains then add

lg uuu aaa lll . uuu aaa _:nnn .where _:nnn identifies a blank node allocated to the literal lll by this rule.

Rule Name if E contains then add

gluuu aaa _:nnn .where _:nnn identifies a blank node allocated to the literal lll by rule lg.

uuu aaa lll .

Page 25: The Semantic Web #7 - RDF Semantics

25Linked Data & Semantic Web Technology

RDF Entailment Rules

Rule Name if E contains then add

rdf1 uuu aaa yyy . aaa rdf:type rdf:Property .

rdf2uuu aaa lll .where lll is a well-typed XML literal .

_:nnn rdf:type rdf:XMLLiteral .where _:nnn identifies a blank node allocated to lll by rule lg.

Page 26: The Semantic Web #7 - RDF Semantics

26Linked Data & Semantic Web Technology

RDFS Entailment RulesRule Name if E contains then add

rdfs1uuu aaa lll.where lll is a plain literal (with or without a language tag).

_:nnn rdf:type rdfs:Literal .where _:nnn identifies a blank node allocated to lll by rule rule lg.

rdfs2aaa rdfs:domain xxx .uuu aaa yyy .

uuu rdf:type xxx .

rdfs3aaa rdfs:range xxx .uuu aaa vvv .

vvv rdf:type xxx .

rdfs4a uuu aaa xxx . uuu rdf:type rdfs:Resource .

rdfs4b uuu aaa vvv. vvv rdf:type rdfs:Resource .

rdfs5uuu rdfs:subPropertyOf vvv .vvv rdfs:subPropertyOf xxx .

uuu rdfs:subPropertyOf xxx .

rdfs6 uuu rdf:type rdf:Property . uuu rdfs:subPropertyOf uuu .

rdfs7aaa rdfs:subPropertyOf bbb .uuu aaa yyy .

uuu bbb yyy .

rdfs8 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf rdfs:Resource .

rdfs9uuu rdfs:subClassOf xxx .vvv rdf:type uuu .

vvv rdf:type xxx .

rdfs10 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf uuu .

rdfs11uuu rdfs:subClassOf vvv .vvv rdfs:subClassOf xxx .

uuu rdfs:subClassOf xxx .

rdfs12uuu rdf:type rdfs:ContainerMembershipProperty .

uuu rdfs:subPropertyOf rdfs:member .

rdfs13 uuu rdf:type rdfs:Datatype . uuu rdfs:subClassOf rdfs:Literal .

Page 27: The Semantic Web #7 - RDF Semantics

27Linked Data & Semantic Web Technology

Extensional Entailment Rules

Rule Name if E contains then add

ext1uuu rdfs:domain vvv .vvv rdfs:subClassOf zzz .

uuu rdfs:domain zzz .

ext2uuu rdfs:range vvv .vvv rdfs:subClassOf zzz .

uuu rdfs:range zzz .

ext3uuu rdfs:domain vvv .www rdfs:subPropertyOf uuu .

www rdfs:domain vvv .

ext4uuu rdfs:range vvv .www rdfs:subPropertyOf uuu .

www rdfs:range vvv .

ext5rdf:type rdfs:subPropertyOf www .www rdfs:domain vvv .

rdfs:Resource rdfs:subClassOf vvv .

ext6rdfs:subClassOf rdfs:subPropertyOf www .www rdfs:domain vvv .

rdfs:Class rdfs:subClassOf vvv .

ext7rdfs:subPropertyOf rdfs:subPropertyOf www .www rdfs:domain vvv .

rdf:Property rdfs:subClassOf vvv .

ext8rdfs:subClassOf rdfs:subPropertyOf www .www rdfs:range vvv .

rdfs:Class rdfs:subClassOf vvv .

ext9rdfs:subPropertyOf rdfs:subPropertyOf www .www rdfs:range vvv .

rdf:Property rdfs:subClassOf vvv .

Page 28: The Semantic Web #7 - RDF Semantics

28Linked Data & Semantic Web Technology

References• http://www.w3.org/TR/2004/REC-rdf-mt-20040210/• http://en.wikipedia.org/wiki/Semantics• Pascal Hitzler, Knowledge Representation for the Semantic Web, Winter 2011.• http://www.slideshare.net/baojie_iowa/rdf-semantics• http://www.slideshare.net/lysander07/08-semantic-web-technologies-rdfs-semantics• http://www.csee.umbc.edu/courses/691s/notes/06rdfsemantics.ppt

Page 29: The Semantic Web #7 - RDF Semantics

29Linked Data & Semantic Web Technology

29

Dr. Myungjin Lee

e-Mail : [email protected] : http://twitter.com/MyungjinLee

Facebook : http://www.facebook.com/mjinlee

SlideShare : http://www.slideshare.net/onlyjiny/

Thanks foryour attention.