The Semantic Web #7 - RDF Semantics

1,128 views

Published on

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

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,128
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
60
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

The Semantic Web #7 - RDF Semantics

  1. 1. Linked Data &Semantic WebTechnology The Semantic Web Part 7. RDF Semantics Dr. Myungjin Lee
  2. 2. RDF • RDF – an assertional language intended to be used to express propositions using precise formal vocabularies – to provide a basic foundation for more advanced assertional languages – to emphasize generality and precision in expressing propositions about any topic 2Linked Data & Semantic Web Technology
  3. 3. 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 3Linked Data & Semantic Web Technology
  4. 4. 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 Model Interpretation Daisy isA Cow Cow kindOf Animal Mary isA Person Person kindOf Animal a Z123ABC isA Car b Mary drives Z123ABC {<a,b>,…} 4Linked Data & Semantic Web Technology
  5. 5. Terms • interpretation – an interpretation is a world with each symbol and each expression assigned 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’ 5Linked Data & Semantic Web Technology
  6. 6. Logical Consequence (Entailment) • logical consequence – if an RDFS document contains u rdf:type ex:Textbook. ex:Textbook rdfs:subClassOf ex:Book. – then u rdf:type ex:Book. It is deduced (deduction) or inferred (inference). propositions (statements) ㅠ logical entailment p1 p2 p3 ㅠ ㅠ ㅠ models models models of p1 of p3 of p2 interpretations 6Linked Data & Semantic Web Technology
  7. 7. 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 7Linked Data & Semantic Web Technology
  8. 8. 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 8Linked Data & Semantic Web Technology
  9. 9. 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 9Linked Data & Semantic Web Technology
  10. 10. 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) 10Linked Data & Semantic Web Technology
  11. 11. 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. 11Linked Data & Semantic Web Technology
  12. 12. 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 itself. – 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. 12Linked Data & Semantic Web Technology
  13. 13. RDF Interpretations • RDF vocabulary – The RDF vocabulary, rdfV, is a set of URI references in the rdf: namespace 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 • 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 . 13Linked Data & Semantic Web Technology
  14. 14. 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)> 14Linked Data & Semantic Web Technology
  15. 15. RDF Entailments • S rdf-entails E when every rdf-interpretation which satisfies every member of S also satisfies E 15Linked Data & Semantic Web Technology
  16. 16. 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 16Linked Data & Semantic Web Technology
  17. 17. 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) 17Linked Data & Semantic Web Technology
  18. 18. 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)) 18Linked Data & Semantic Web Technology
  19. 19. RDFS Axiomatic Triples rdf:type rdfs:domain rdfs:Resource . rdfs:domain rdfs:domain rdf:Property . rdfs:member rdfs:range rdfs:Resource . rdfs:range rdfs:domain rdf:Property . rdf:first rdfs:range rdfs:Resource . rdfs:subPropertyOf rdfs:domain rdf:Property . rdf:rest rdfs:range rdf:List . rdfs:subClassOf rdfs:domain rdfs:Class . rdfs:seeAlso rdfs:range rdfs:Resource . rdf:subject rdfs:domain rdf:Statement . rdfs:isDefinedBy rdfs:range rdfs:Resource . rdf:predicate rdfs:domain rdf:Statement . rdfs:comment rdfs:range rdfs:Literal . rdf:object rdfs:domain rdf:Statement . rdfs:label rdfs:range rdfs:Literal . rdfs:member rdfs:domain rdfs:Resource . rdf:value rdfs:range rdfs:Resource . rdf:first rdfs:domain rdf:List . rdf:Alt rdfs:subClassOf rdfs:Container . rdf:rest rdfs:domain rdf:List . rdf:Bag rdfs:subClassOf rdfs:Container . rdfs:seeAlso rdfs:domain rdfs:Resource . rdf:Seq rdfs:subClassOf rdfs:Container . rdfs:isDefinedBy rdfs:domain rdfs:Resource . rdfs:ContainerMembershipProperty rdfs:subClassOf rdfs:comment rdfs:domain rdfs:Resource . rdf:Property . rdfs:label rdfs:domain rdfs:Resource . rdf:value rdfs:domain rdfs:Resource . rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso . rdf:type rdfs:range rdfs:Class . rdf:XMLLiteral rdf:type rdfs:Datatype . rdfs:domain rdfs:range rdfs:Class . rdf:XMLLiteral rdfs:subClassOf rdfs:Literal . rdfs:range rdfs:range rdfs:Class . rdfs:Datatype rdfs:subClassOf rdfs:Class . rdfs:subPropertyOf rdfs:range rdf:Property . rdfs:subClassOf rdfs:range rdfs:Class . rdf:_1 rdf:type rdfs:ContainerMembershipProperty . rdf:subject rdfs:range rdfs:Resource . rdf:_1 rdfs:domain rdfs:Resource . rdf:predicate rdfs:range rdfs:Resource . rdf:_1 rdfs:range rdfs:Resource . rdf:object rdfs:range rdfs:Resource . rdf:_2 rdf:type rdfs:ContainerMembershipProperty . rdf:_2 rdfs:domain rdfs:Resource . rdf:_2 rdfs:range rdfs:Resource . ... 19Linked Data & Semantic Web Technology
  20. 20. 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 . 20Linked Data & Semantic Web Technology
  21. 21. 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)) 21Linked Data & Semantic Web Technology
  22. 22. 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 22Linked Data & Semantic Web Technology
  23. 23. Entailment Rules • What is Entailment Rules? – some inference patterns which capture some of the various forms of vocabulary 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 23Linked Data & Semantic Web Technology
  24. 24. Simple Entailment Rules • Simple Entailment Rules Rule Name if E contains then add uuu aaa _:nnn . se1 uuu aaa xxx . where _:nnn identifies a blank node allocated to xxx by rule se1 or se2. _:nnn aaa xxx . se2 uuu aaa xxx . where _:nnn identifies a blank node allocated to uuu by rule se1 or se2. • Literal Generalization Rule Rule Name if E contains then add uuu aaa _:nnn . lg uuu aaa lll . where _:nnn identifies a blank node allocated to the literal lll by this rule. • Literal Instantiation Rule Rule Name if E contains then add uuu aaa _:nnn . gl uuu aaa lll . where _:nnn identifies a blank node allocated to the literal lll by rule lg. 24Linked Data & Semantic Web Technology
  25. 25. RDF Entailment Rules Rule Name if E contains then add rdf1 uuu aaa yyy . aaa rdf:type rdf:Property . uuu aaa lll . _:nnn rdf:type rdf:XMLLiteral . rdf2 where lll is a well-typed XML literal . where _:nnn identifies a blank node allocated to lll by rule lg. 25Linked Data & Semantic Web Technology
  26. 26. RDFS Entailment Rules Rule Name if E contains then add uuu aaa lll. _:nnn rdf:type rdfs:Literal . rdfs1 where lll is a plain literal (with or without a language ta where _:nnn identifies a blank node allocated to lll by rule g). rule lg. aaa rdfs:domain xxx . rdfs2 uuu rdf:type xxx . uuu aaa yyy . aaa rdfs:range xxx . rdfs3 vvv rdf:type xxx . uuu aaa vvv . rdfs4a uuu aaa xxx . uuu rdf:type rdfs:Resource . rdfs4b uuu aaa vvv. vvv rdf:type rdfs:Resource . uuu rdfs:subPropertyOf vvv . rdfs5 uuu rdfs:subPropertyOf xxx . vvv rdfs:subPropertyOf xxx . rdfs6 uuu rdf:type rdf:Property . uuu rdfs:subPropertyOf uuu . aaa rdfs:subPropertyOf bbb . rdfs7 uuu bbb yyy . uuu aaa yyy . rdfs8 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf rdfs:Resource . uuu rdfs:subClassOf xxx . rdfs9 vvv rdf:type xxx . vvv rdf:type uuu . rdfs10 uuu rdf:type rdfs:Class . uuu rdfs:subClassOf uuu . uuu rdfs:subClassOf vvv . rdfs11 uuu rdfs:subClassOf xxx . vvv rdfs:subClassOf xxx . uuu rdf:type rdfs12 uuu rdfs:subPropertyOf rdfs:member . rdfs:ContainerMembershipProperty . rdfs13 uuu rdf:type rdfs:Datatype . uuu rdfs:subClassOf rdfs:Literal . 26Linked Data & Semantic Web Technology
  27. 27. Extensional Entailment Rules Rule Name if E contains then add uuu rdfs:domain vvv . ext1 uuu rdfs:domain zzz . vvv rdfs:subClassOf zzz . uuu rdfs:range vvv . ext2 uuu rdfs:range zzz . vvv rdfs:subClassOf zzz . uuu rdfs:domain vvv . ext3 www rdfs:domain vvv . www rdfs:subPropertyOf uuu . uuu rdfs:range vvv . ext4 www rdfs:range vvv . www rdfs:subPropertyOf uuu . rdf:type rdfs:subPropertyOf www . ext5 rdfs:Resource rdfs:subClassOf vvv . www rdfs:domain vvv . rdfs:subClassOf rdfs:subPropertyOf www . ext6 rdfs:Class rdfs:subClassOf vvv . www rdfs:domain vvv . rdfs:subPropertyOf rdfs:subPropertyOf www . ext7 rdf:Property rdfs:subClassOf vvv . www rdfs:domain vvv . rdfs:subClassOf rdfs:subPropertyOf www . ext8 rdfs:Class rdfs:subClassOf vvv . www rdfs:range vvv . rdfs:subPropertyOf rdfs:subPropertyOf www . ext9 rdf:Property rdfs:subClassOf vvv . www rdfs:range vvv . 27Linked Data & Semantic Web Technology
  28. 28. 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 28Linked Data & Semantic Web Technology
  29. 29. Dr. Myungjin Lee e-Mail : mjlee@li-st.com Twitter : http://twitter.com/MyungjinLee Facebook : http://www.facebook.com/mjinlee SlideShare : http://www.slideshare.net/onlyjiny/ 29 29Linked Data & Semantic Web Technology

×