SlideShare une entreprise Scribd logo
1  sur  124
SSeemmaannttiicc WWeebb:: 
SSttaattee ooff tthhee AArrtt aanndd OOppppoorrttuunniittiieess 
Aatif Hussain Warraich 
Compiled, partly based on various online tutorials 
and presentations, with respect to their authors 
University of Engineering and Technology, Lahore
Where we are Today: 
the Syntactic Web 
[Hendler & Miller 02]
MMoosstt ooff tthhee CCuurrrreenntt WWeebb ((dduummbb lliinnkkss))
SSeemmaannttiicc WWeebb 
((ddaattaa ccoonnnneecctteedd bbyy rreellaattiioonnsshhiippss))
AApppprrooaacchh:: SSeemmaannttiicc WWeebb 
“The Semantic Web is a vision: the idea of having data on the 
Web defined and linked in a way that it can be used by 
machines not just for display purposes, 
but for automation, integration and reuse 
of data across various applications” 
http://www.w3.org/sw/ 
The Semantic Web is an initiative with the goal of extending the 
current Web and facilitating Web automation, universally accessible 
web resources, and the 'Web of Trust', providing a universally 
accessible platform that allows data to be shared and processed by 
automated tools as well as by people.
Tim Berners-Lee's Vision of 
Semantic Web (IJCAI-01)
Semantic Web Stack 
(updated, W3C, 2006)
SSeemmaannttiicc WWeebb:: NNeeww ““UUsseerrss”” 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents
Semantic Web: Annotations 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
Semantic annotations are 
specific sort of metadata, 
which provides information 
about particular domain 
objects, values of their 
properties and relationships, 
in a machine-processable, 
formal and standardized way.
Semantic Web: Ontologies 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
Ontologies make metadata 
interoperable and ready for 
efficient sharing and reuse. It 
provides shared and common 
understanding of a domain, that 
can be used both by people and 
machines. Ontologies are used as 
a form of agreement-based 
knowledge representation about 
the world or some part of it and 
generally describe: domain 
individuals, classes, attributes, 
relations and events.
Semantic Web: Rules 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
Logical support in form of rules is needed to 
infer implicit content, metadata and ontologies 
from the explicit ones. Rules are considered to 
be a major issue in the further development of 
the semantic web. On one hand, they can be 
used in ontology languages, in conjunction with 
or as an alternative to description logics. And on 
the other hand, they will act as a means to draw 
inferences, to configure systems, to express 
constraints, to specify policies, to react to 
events/changes, to transform data, to specify 
behavior of agents, etc.
Semantic Web: Languages 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
Languages are needed for machine-processable 
formal descriptions of: metadata (annotations) like 
e.g. RDF; ontologies like e.g. OWL.; rules like e.g. 
RuleML. The challenge is to provide a framework for 
specifying the syntax (e.g. XML) and semantics of 
all of these languages in a uniform and coherent 
way. The strategy is to translate the various 
languages into a common 'base' language (e.g. CL 
or Lbase) providing them with a single coherent 
model theory.
Semantic Web: Tools 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
User-friendly tools are needed for 
metadata manual creation (annotating 
content) or automated generation, for 
ontology engineering and validation, 
for knowledge acquisition (rules), for 
languages parsing and processing, 
etc.
Semantic Web: Applications and Services 
Semantic Users 
Web and 
Beyond 
Semantic 
Annotations Ontologies Logical Support 
Languages Tools Applications / 
Services 
WWW Creators Users 
and 
Beyond 
Web content 
Semantic 
Web 
Semantic Web 
content 
Creators 
applications 
agents 
Utilization of Semantic Web 
metadata, ontologies, rules, 
languages and tools enables to 
provide scalable Web applications 
and Web services for consumers 
and enterprises" making the web 
'smarter' for people and machines.
The Semantic Web 
The Ontology Articulation 
Toolkit helps agents to 
understand unknown ontologies
Semantic Web basics… 
 RDF: 
• is a W3C standard, which provides tool to describe Web 
resources 
• provides interoperability between applications that 
exchange machine-understandable information 
 RDF Schema: 
– is a W3C standard which defines vocabulary for RDF 
– organizes this vocabulary in a typed hierarchy 
– capable to explicitly declare semantic relations between 
vocabulary terms
RDF – Semantic Web over Web Resources 
Mary 
Director 
Secretary 
has_job 
to_be_in_ 
love_with 
has_job 
John 
has_homepage 
has_homepage 
OOnnttoollooggyy
Resources 
• All things being described by RDF 
expressions are called resources: 
– entire Web page; 
– a specific XML element; 
– whole collection of pages; 
– an object that is not directly accessible via the 
Web.
26 
RDF Statement 
Property_k 
Resource_i Value_n 
Resource_i 
Property_r 
Resource_ j 
OR
Semantic Relation as RDF statement 
(so called “object property”) 
Personal web page of Terziyan V. Web page of Agora Center 
27 
Lk 
Ai Aj 
Relation (i ¹ j) 
http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.html 
refers_to 
Resource 
Relation 
Resource 
Subject Predicate object 
URI of Terziyan V. employed_by 
http://www.cs.jyu.fi/ai/vagan/#vagan 
URI of Agora Center 
http://www.jyu.fi/agora-center/#AC 
Dereferenceable URI (“Hash vs. Slash”)
Semantic Property as RDF statement 
(so called “datatype property”) 
28 
Personal web page of Terziyan V. 
http://www.cs.jyu.fi/ai/vagan/index.html 
Literal 
Literal 
Resource 
has_birthday 
Property 
Subject Predicate object 
Ai 
Lk 
Property (i = j) 
15.02.2000 
“Birthday” of the web-page 
URI of Terziyan V. has_birthday 
http://www.cs.jyu.fi/ai/vagan/#vagan 
27.12.1958 
Dereferenceable URI (“Hash vs. Slash”) 
Birthday of Terziyan V.
Semantic Network of Web Resources 
15.02.2000 
has_birthday 
Personal web page of Terziyan V. Web page of Agora Center 
http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.html 
29 
refers_to 
isWebPageOf 
27.12.1958 isWebPageOf 
URI of Terziyan V. employed_by URI of Agora Center 
http://www.cs.jyu.fi/ai/vagan/#vagan 
http://www.jyu.fi/agora-center/#AC 
hasWebPage 
hasWebPage 
has_birthday
http://www.kture.kharkov.ua/ 
30 
From Hyperlinks to Semantic Web 
http://www.cs.jyu.fi/ai/ university 
international 
_contacts 
http://www.cs.jyu.fi/ai/contacts.html
Resources and URIs 
• A resource can be anything that has identity 
• Uniform Resource Identifiers (URI)* provide 
a simple and extensible means for identifying 
a resource 
• Not all resources are network "retrievable"; 
e.g., human beings, corporations, and books 
in a library can also be considered resources 
* The term "Uniform Resource Locator" (URL) refers to the subset of URI that identify 
resources via a representation of their primary access mechanism (e.g., their network "location"), 
rather than identifying the resource by name or by some other attribute(s) of that resource.
URI vs. URL 
A URI represents a single concept or thing, 
but many URIs can represent the same thing. 
All URLs are URIs. Not all URIs are URLs. 
URI identifies something uniquely. 
URL not only identifies something, but also 
describes where it is located. 
Venn diagram of Uniform Resource Identifier (URI) scheme categories. 
Schemes in the URL (locator) and URN (name) categories both 
function as resource IDs, so URL and URN are subsets of URI. They 
are also, generally, disjoint sets. However, many schemes can't be 
categorized as strictly one or the other, because all URIs can be 
treated as names, and some schemes embody aspects of both 
categories – or neither.
URL vs. URI example 
URI of Vagan Terziyan in Nordea Database: 
http://www.NordeaDB.fi/#VaganTerziyan 
URI of Vagan Terziyan in the Central Hospital 
Database: 
http://www.JKL_Central_Hospital_DB.fi/#VaganTerziyan 
URL of Vagan Terziyan record in Nordea Database: 
http://www.NordeaDB.fi/VaganTerziyanRecord 
URL of Vagan Terziyan record in the Central Hospital Database: 
http://www.JKL_Central_Hospital_DB.fi/VaganTerziyanRecord 
?
Dereferenceable URI 
The term Linked Data is used to describe a method of exposing, sharing, 
and connecting data via dereferenceable* URIs on the Web. 
Linked Data is about using the Web to connect related data that wasn’t 
previously linked, or using the Web to lower the barriers to linking data 
currently linked using other methods. More specifically, Wikipedia defines 
Linked Data as a term used to describe a recommended best practice for 
exposing, sharing, and connecting pieces of data, information, and knowledge 
on the Semantic Web using URIs and RDF. Linked Data aims to extend the 
Web with a data commons by publishing various open datasets as RDF on the 
Web and by setting RDF links between data items from different data sources. 
*A dereferenceable Uniform Resource Identifier or dereferenceable URI 
is a resource retrieval mechanism that uses any of the internet protocols (e.g. 
HTTP) to obtain a copy or representation of the resource it identifies. In the 
context of traditional HTML web pages, this is the normal and obvious way of 
working: A URI refers to the page, and when requested the web server 
returns a copy of it. In other non-dereferenceable contexts, such as XML 
Schema, the namespace identifier is still a URI, but this is simply an identifier 
(i.e. a namespace name). There is no intention that this can or should be 
dereferenced. There is even a separate attribute, schemaLocation, which 
may contain a dereferenceable URI that does point to a copy of the schema 
document. In the case of Linked Data, the representation takes the form of a 
document (typically HTML or XML) that describes the resource that the URI 
identifies. In either case, the mechanism makes it possible for a user (or 
software agent) to "follow your nose" to find out more information related to 
the identified resource. 
http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html
Relationships between URIs illustrated 
The picture shows a Big Lynx film team at work. Within the picture, Big Lynx Lead Cameraman Matt 
Briggs as well as his two assistants, Linda Meyer and Scott Miller, are identified by HTTP URIs from 
the Big Lynx namespace. The relationship, that they know each other, is represented by connecting 
lines having the relationship type http://xmlns.com/foaf/0.1/knows. 
[source: http://linkeddatabook.com/editions/1.0/ ]
RDF Statement 
• Subject of an RDF statement is a 
resource 
• Predicate of an RDF statement is a 
property of a resource 
• Object of an RDF statement is the value 
of a property of a resource
Example of RDF Statement 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
Subject (resource) http://www.w3.org/Home/Lassila 
Predicate (property) Creator 
Object (literal) “Ora Lassila” 
Lets represent the above statement in RDF/XML in accordance with the 
“serialization” and the “abbreviated” syntax (see next slides):
RDF Example in serialization syntax 
(subject of statement) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:RDF> 
<rdf:Description rdf:about= 
"http://www.w3.org/Home/Lassila"> 
<s:Creator>Ora Lassila</s:Creator> 
</rdf:Description> 
</rdf:RDF> 
Subject
RDF Example in serialization syntax 
(predicate of statement) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:RDF> 
<rdf:Description rdf:about= 
"http://www.w3.org/Home/Lassila"> 
<s:Creator>Ora Lassila</s:Creator> 
</rdf:Description> 
</rdf:RDF> 
Predicate
RDF Example in serialization syntax 
(object of statement) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:RDF> 
<rdf:Description rdf:about= 
"http://www.w3.org/Home/Lassila"> 
<s:Creator>Ora Lassila</s:Creator> 
</rdf:Description> 
</rdf:RDF> 
Object
RDF Example in serialization syntax 
(reference to ontology) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:RDF> 
<rdf:Description rdf:about= 
"http://www.w3.org/Home/Lassila"> 
<s:Creator>Ora Lassila</s:Creator> 
</rdf:Description> 
</rdf:RDF> a specific namespace prefix as reference to 
ontology where predicates are defined, e.g. 
xmlns: s="http://description.org/schema/"
Full XML Document in serialization syntax 
for the Example 
<?xml version="1.0"?> 
<rdf:RDF 
xmlns:rdf="http://www.w3.org/1999/02/22- 
rdf-syntax-ns#" 
xmlns:s="http://description.org/schema/" 
> 
<rdf:Description rdf:about= 
"http://www.w3.org/Home/Lassila"> 
<s:Creator>Ora Lassila</s:Creator> 
</rdf:Description> 
</rdf:RDF> 
Namespaces
Template/frame for RDF/XML statement (1) 
Subject (URI) 
p Ontology (URI) 
Value 
p Predicat p 
e 
Predicat 
e 
Value 
Predicate 
Subject
Template/frame for RDF/XML statement (2) 
p Ontology (URI) 
p 
Subject (URI) 
Object (URI) 
Predicate 
Subject Object
RDF/XML Online Validator 
http://www.w3.org/RDF/Validator/
Abbreviated Syntax Example (1) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:RDF> 
<rdf:Description rdf:about="http://www.w3.org/Home/Lassila" 
s:Creator="Ora Lassila" /> 
</rdf:RDF> 
<?xml version="1.0"?> 
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:s="http://description.org/schema/"> 
<rdf:Description rdf:about="http://www.w3.org/Home/Lassila" 
s:Creator="Ora Lassila"/> 
</rdf:RDF>
Abbreviated Syntax Example (2) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. Subject 
<rdf:Description rdf:about="http://www.w3.org/Home/Lassila" 
s:Creator="Ora Lassila" />
Abbreviated Syntax Example (3) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:Description rdf:about="http://www.w3.org/Home/Lassila" 
s:Creator ="Ora Lassila" /> 
Predicate
Abbreviated Syntax Example (4) 
Ora Lassila is the creator of the resource 
http://www.w3.org/Home/Lassila. 
<rdf:Description rdf:about="http://www.w3.org/Home/Lassila" 
s:Creator="Ora Lassila" /> 
Object
Template/frame for RDF statement 
<?xml version="1.0"?> 
<rdf:RDF 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns: = " " > 
<rdf:Description rdf:about= " “ " 
: = " " /> 
</rdf:RDF> 
Ontology (URI) 
Predicat Value 
e 
prefix 
Subject 
(URI) 
prefi 
x 
Value 
Predicate 
Subject
RDF N3 syntax 
• Notation3, or N3 as it is more commonly known, is a 
shorthand non-XML serialization of RDF models, 
designed with human-readability in mind: N3 is much 
more compact and readable than XML RDF notation. 
The format is being developed by Tim Berners-Lee 
and others from the Semantic Web community. 
RDF sample in 
XML notation 
RDF sample 
in N3 notation 
http://www.w3.org/TeamSubmission/n3/
RDF N3 syntax 
Some fast hints: 
All URIs are quoted with angle brackets ( “<“ and “>” ). 
Whitespace within the < > is to be ignored. 
All values are within " " . 
Each statement ends with “.” 
@pref is used to define the namespace prefix. 
[ ] are used for the “blank nodes”. 
Check all in : http://www.w3.org/TeamSubmission/n3/ 
Shorthand: 
Example: 
@PREFIX dc: <http://purl.org/dc/elements/1.1/> . 
<http://en.wikipedia.org/wiki/Tony_Benn> 
dc:publisher 
"Wikipedia" . 
Square brackets for blank nodes: 
[ pl ] means x, where there exists some x such that x has properties in the property list pl. For example: 
[ :firstname "Ora" ] dc:wrote [ dc:title "Moby Dick" ] . 
… is a statement which would be means in math: 
exists x, y . firstname(x, "Ora") & dc:wrote(x,y) & dc:title (y, "Moby Dick") 
… or in English "Some person who has a first name Ora wrote a book entitled "Moby Dick". Note not 
"the book" or "the person".
Template/frame for RDF statement (N3) 
Predicate 
Subject Object 
Predicate 
OR 
Subject Value 
Subject 
< (URI) > < Predicate (URI) > < Object (URI) > . 
OR 
Subject 
(URI) < > < Predicate (URI) > " Value " . 
OR 
@prefix Onto: 
< Ontology (URI) > . 
Onto : Subject Onto : Predicate Onto : Object . 
Onto : Subject Onto : Predicate " Value " .
Some N3 syntax specifics 
http://www.w3.org/TeamSubmission/n3/ 
Ontological statements in N3 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
:Professor a rdfs:Class . 
<http://www.cs.jyu.fi/ai/vagan> a :Professor .
RDF N3 examples 
The story 4 RDF (N3) statements 
1. Gender of Vagan Terziyan is male. 
2. His mother is Svetlana Terziyan. 
3. He is fun of fishing. 
4. He is fun of Nordic walking. 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > 
"male" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan 
> . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"Fishing" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"NordicWalking" .
RDF N3 examples 
1. Gender of Vagan Terziyan is male. 
2. His mother is Svetlana Terziyan. 
3. He is fun of fishing. 
4. He is fun of Nordic walking. 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > 
"male" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan 
> . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"Fishing" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"NordicWalking" . 
Reader-friendly version 
@prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . 
@prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . 
On1:VaganTerziyan On1:hasGender "male" . 
On1:VaganTerziyan On1:hasMother On1:SvetlanaTerziyan . 
On1:VaganTerziyan On2:isFunOf "Fishing" . 
On1:VaganTerziyan On2:isFunOf "NordicWalking" .
RDF N3 examples 
1. Gender of Vagan Terziyan is male. 
2. His mother is Svetlana Terziyan. 
3. He is fun of fishing. 
4. He is fun of Nordic walking. 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > 
"male" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan 
> . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"Fishing" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"NordicWalking" . 
Compact version 
@prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . 
@prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . 
On1:VaganTerziyan On1:hasGender "male" ; On1:hasMother On1:SvetlanaTerziyan ; 
On2:isFunOf "Fishing" , "NordicWalking" .
Online RDF translator 
http://rdf-translator.appspot.com/
… lets validate the translation 
http://www.w3.org/RDF/Validator/
Online RDF translator (“Ora Lassila” example) 
http://rdf-translator.appspot.com/
RDF/N3 example (blank node with [ ]) 
1. Gender of Vagan Terziyan is male. 
2. His mother is Svetlana Terziyan. 
3. He is fun of fishing. 
4. He is fun of Nordic walking. 
5. He is fun of mother’s hobby. 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > 
"male" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan 
> . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"Fishing" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
"NordicWalking" . 
<http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> 
[<http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isHobbyOf> < 
http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan>]. 
Compact version 
@prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . 
@prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . 
On1:VaganTerziyan On1:hasGender "male" ; On1:hasMother On1:SvetlanaTerziyan ; 
On2:isFunOf "Fishing" , "NordicWalking" , [On2:isHobbyOf On1:SvetlanaTerziyan ] .
… lets translate it to RDF/XML … 
http://rdf-translator.appspot.com/
… and check with RDF/XML validator 
http://www.w3.org/RDF/Validator/
What is an ontology? 
Studer(98): Formal, explicit specification of a shared conceptualization 
Machine 
readable 
Concepts, properties, 
functions, axioms 
are explicitly defined 
Consensual 
knowledge 
Abstract model of 
some domain
66 
What is an Ontology? 
A model of (some aspect of) the world 
• Introduces vocabulary 
relevant to domain, e.g.: 
– Anatomy 
From: Ian Horrocks “OWL 2: 
The Next Generation”
67 
What is an Ontology? 
A model of (some aspect of) the world 
• Introduces vocabulary 
relevant to domain 
• Specifies meaning of terms 
Heart is a muscular organ that 
is part of the circulatory system 
From: Ian Horrocks “OWL 2: 
The Next Generation”
68 
What is an Ontology? 
A model of (some aspect of) the world 
• Introduces vocabulary 
relevant to domain 
• Specifies meaning of terms 
Heart is a muscular organ that 
is part of the circulatory system 
• Formalised using suitable logic 
From: Ian Horrocks “OWL 2: 
The Next Generation”
Ontology Elements 
• Concepts(classes) + their hierarchy 
• Concept properties (slots/attributes) + their hierarchy 
• Property restrictions (type, cardinality, domain …) 
• Relations between concepts (disjoint, equality …) 
• Instances
70 
DL Semantics 
Semantics given by standard FO model theory: 
John 
Mary 
Lawyer 
Doctor 
Vehicle 
hasChild 
owns 
(Lawyer and Doctor) 
From: Ian Horrocks “OWL: A 
Description Logic Based 
Ontology Language”
RDF Schema (language for simple ontologies) 
RDF schema is a semantic extension of RDF used for simple ontologies’ design. 
The RDF schema language is used for declaring basic class and types when 
describing the terms used in RDF and are used to determine characteristics of 
other resources, such as the domains and ranges of properties. 
• rdfs:Resource 
• rdfs:Class 
• rdfs:domain 
• rdfs:range 
• rdfs:subClassOf 
• rdfs:subPropertyOf 
• … 
RDF Schema provides a data-modelling 
vocabulary for RDF data. 
http://www.w3.org/TR/rdf-schema/ 
The RDF Schema class and property 
system is similar to the type systems of 
object-oriented programming 
languages such as Java. RDF Schema 
differs from many such systems in that 
instead of defining a class in terms of 
the properties its instances may have, 
RDF Schema describes properties in 
terms of the classes of resource to 
The namespace is identified by: which they apply. 
http://www.w3.org/2000/01/rdf-schema#
RDFS example 
… 
:Mary :hasHusband :John . 
… 
:hasSpooth 
rdf:type 
:hasHusband 
rdf:property 
rdfs:Domain 
rdfs:Range 
:Woman 
:Man 
:Person 
rdfs:subClassOf 
rdfs:subPropertyOf 
rdfs:Domain 
rdfs:Range 
rdf:type 
rdfs:Class 
rdf:type 
rdf:type 
:John 
:Mary 
rdf:type 
rdf:type 
RDFS 
:hasHusband 
RDF 
rdfs:subClassOf 
rdf:type
RDFS example 
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix : <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . 
:Person a rdfs:Class . 
:Woman a rdfs:Class . 
:Man a rdfs:Class . 
:Woman rdfs:subClassOf :Person . 
:Man rdfs:subClassOf :Person . 
:hasHusband a rdf:Property . 
:hasSpooth a rdf:Property . 
:hasHusband rdfs:subPropertyOf :hasSpooth . 
:hasSpooth rdfs:domain :Person . 
:hasSpooth rdfs:range :Person . 
:hasHusband rdfs:domain :Woman . 
:hasHusband rdfs:range :Man . 
:John a :Man . 
:Mary a :Woman . 
:Mary :hasHusband :John .
RDFS example (translate to RDF/XML) 
http://rdf-translator.appspot.com/
… and validate RDF/XML 
http://www.w3.org/RDF/Validator/
RDFS example (continue) 
Adding some “cosmetics” from OWL 
(Web Ontology Language): 
@base <http://www.cs.jyu.fi/ai/vagan/LifeInFinland.owl> . 
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
. 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix owl: <http://www.w3.org/2002/07/owl#> . 
@prefix : <http://www.cs.jyu.fi/ai/vagan/LifeInFinland.owl#> . 
:Person a rdfs:Class . 
:Woman a rdfs:Class . 
:Man a rdfs:Class . 
:Woman rdfs:subClassOf :Person . 
:Man rdfs:subClassOf :Person . 
:hasSpooth a 
owl:ObjectProperty . 
:hasHusband a 
owl:ObjectProperty . 
:hasHusband rdfs:subPropertyOf :hasSpooth . 
:hasSpooth rdfs:domain :Person . 
:hasSpooth rdfs:range :Person . 
:hasHusband rdfs:domain :Woman . 
:hasHusband rdfs:range :Man . 
:John a :Man . 
:Mary a :Woman . 
:Mary :hasHusband :John .
… then we got translation to RDF/XML 
http://rdf-translator.appspot.com/
… validating RDF/XML 
http://www.w3.org/RDF/Validator/
… then we publish RDF/XML as OWL file to 
the right place in the Web
Opening file in Protégé (Screenshot 1)
Opening file in Protégé (Screenshot 2)
Dublin Core 
• A set of fifteen basic properties for describing 
generalised Web resources; 
• ISO Standard 15836-2003 (February 2003) and 
ANSI/NISO Z39.85-2012 (February 2013) : 
http://www.niso.org/apps/group_public/download.php/10 
256/Z39-85-2012_dublin_core.pdf 
The Dublin Core Metadata Initiative is an open forum engaged in the development of interoperable online 
metadata standards that support a broad range of purposes and business models. 
Namespace: 
@prefix dc: http://purl.org/dc/elements/1.0/ . 
http://dublincore.org/
Dublin Core (15 basic properties): 
83
Dublin Core Example (RDF/XML) 
<?xml version="1.0"?> 
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:dc="http://purl.org/dc/elements/1.0/"> 
<rdf:Description rdf:about="http://www.ukoln.ac.uk/metadata/resources/dc/datamodel/WD-dc-rdf/"> 
<dc:title> Guidance on expressing the Dublin Core within the RDF </dc:title> 
<dc:creator> Eric Miller </dc:creator> 
<dc:creator> Paul Miller </dc:creator> 
<dc:creator> Dan Brickley </dc:creator> 
<dc:subject> Dublin Core; RDF; XML </dc:subject> 
<dc:publisher> Dublin Core Metadata Initiative </dc:publisher> 
<dc:contributor> Dublin Core Data Model Working Group </dc:contributor> 
<dc:date> 1999-07-01 </dc:date> 
<dc:format> text/html </dc:format> 
<dc:language> en </dc:language> 
</rdf:Description> 
</rdf:RDF>
Dublin Core Example (RDF/N3) 
Obtained with: http://rdf-translator.appspot.com/
RDF (as a Linked Data) Illustrated 
C 
Properties (predicate) 
HUMAN 
#Vagan Vagan Terziyan 27/12/58 #JyU 
#John 
#Aino 
… 
Resources (subject) 
hasBirthday 
isEmployedBy 
hasName 
hasSurname 
:#JyU a UNIVERSITY 
:#JyU :hasTitle “University of Jyvaskyla” 
:#JyU :hasLocation “Finland” 
:#JyU :hasWorldRank “204” 
:#JyU :hasRector :#Aino 
RDF triples 
:#Vagan a HUMAN 
:#Vagan :hasName “Vagan” 
:#Vagan :hasSurname “Terziyan” 
:#Vagan :hasBirthday “27/12/58” 
:#Vagan :isEmployedBy :#JyU 
C 
UNIVERSITY 
#MIT 
#JyU University 
of 
Jyvaskyla 
Finland 204 #Aino 
#KNURE 
… 
hasWorldRank 
hasRector 
hasTitle 
hasLocation 
:#Aino a HUMAN 
Each cell is an 
RDF triple 
RDF triples (continue) 
… … … 
!
Traditional RDF Statement 
• Subject of an RDF statement is a resource 
• Predicate of an RDF statement is a property of a 
resource 
• Object of an RDF statement is the value of a property 
of a resource (either literal or resource) 
Property_k 
Resource_i Literal 
Resource_i 
Property_r 
Resource_ j 
OR
New semantics of RDF Statement in 
S-APL (object - executable resource) 
Resource_i 
Property_m 
exe: Resource_ j 
Semantics of such statement executable property 
means that the value of the 
Property_m of the Resource_i 
can be obtained as a result of 
execution of the procedure (query, 
service, function, etc.) represented 
as Resource_ j 
SS--AAPPLL 
Semantic Agent Programming Language 
(Designed by Industrial Ontologies Group)
execution
RDFa: Combining human- and machine-readable 
information within the same document ! 
RDFa (or Resource Description Framework – in – attributes) is a W3C Recommendation that 
adds a set of attribute-level extensions to XHTML for embedding rich metadata within Web 
documents. RDFa provides a set of XHTML attributes to augment visual data with machine-readable 
hints and turns the existing human-visible text and links into machine-readable data 
without repeating content. The great thing about RDFa is the ability to weave meaning and rich 
data directly into a web page without having any impact on the front-end user experience. 
XHTML 
HTML5 
Today's web is built predominantly for human readers. Even as machine-readable data begins to permeate 
the web, it is typically distributed in a separate file, with a separate format, and very limited correspondence 
between the human and machine versions. As a result, web browsers can provide only minimal assistance to 
humans in parsing and processing web pages: browsers only see presentation information. RDFa is intended 
to solve the problem of marking up machine-readable data in HTML documents. RDFa provides a set of 
HTML attributes to augment visual data with machine-readable hints. Using RDFa, authors may turn their 
existing human-visible text and links into machine-readable data without repeating content.
Example of HTML : 
RDFa Example (1) 
Browser screenshot:
RDFa Example (2) 
http://www.w3.org/TR/xhtml-rdfa-primer/ 
Read first: 
Use: 
(http://rdfa.info/play/) 
Update your HTML with some RDFa inside and check it:
RDFa Example (3) 
HTML marked up with RDFa :
RDFa Example (“Happy end”)
96 
Where to look next 
• RDF: 
http://www.w3.org/RDF/ 
• RDF Schema: 
http://www.w3.org/TR/rdf-schema/ 
• RDFa : 
http://www.w3.org/TR/xhtml-rdfa-primer/
DBpedia http://dbpedia.org/ 
DBpedia (DataBasePedia) is a project aiming to extract structured 
content from the information created as part of the Wikipedia 
project and making it available in the Web. DBpedia allows querying 
relationships and properties associated with Wikipedia resources, 
including links to other related datasets. Therefore DBpedia is one 
of the more famous parts of the decentralized Linked Data effort. 
The DBpedia data set uses a large multi-domain 
ontology which has been derived 
from Wikipedia. The English version of the 
DBpedia 2014 data set currently describes 
4.58 million “things” with 583 million “facts”. 
In addition, localized versions of DBpedia 
available in 125 languages. All these versions 
together describe 38.3 million things, 
out of which 23.8 million overlap (interlinked) 
with concepts from the English DBpedia.
Concepts in DBpedia 
DBpedia Ontology (2014) 
The DBpedia Ontology is a 
shallow, cross-domain 
ontology, which has been 
manually created based 
on the most commonly 
used infoboxes within 
Wikipedia. The ontology 
currently covers 685 
classes which form 
a subsumption hierarchy 
and are described by 2,795 
different properties.
Naming “things” in DBpedia 
http://wiki.dbpedia.org/Datasets 
Each thing in the DBpedia data set is denoted by a de-referenceable URI-based reference of the form: 
http://dbpedia.org/resource/Name , 
where Name is derived from the URL of the source Wikipedia article, which has the form: 
http://en.wikipedia.org/wiki/Name . 
Thus, each DBpedia entity is tied directly to a Wikipedia article. Every DBpedia entity name resolves to a 
description-oriented Web document (or Web resource). Read more in: http://wiki.dbpedia.org/Datasets 
Kharkiv city in Wikipedia and DBpedia 
http://dbpedia.org/resource/Kharkiv http://en.wikipedia.org/wiki/Kharki 
v
Building personal graph as Linked Data 
@base <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . 
@prefix db: <http://dbpedia.org/resource/> . 
@prefix gs: <http://scholar.google.com/citations?user=> . 
db:Kharkiv_National_University_of_Radioelectronics 
db:Kharkiv 
db:Ukraine 
db:Finland 
:hasPhDFrom 
:hasPlaceOf Birth 
db:University_of_Jyvaskyla 
:isCitizenOf 
:isResidentOf 
:isEmployedBy 
:hasPublicationRecord 
: 
VaganTerziyan 
gs:4U8ydfgAAAAJ
OWL: Web Ontology Language 
• The Web Ontology Language (OWL) is a family of knowledge 
representation languages or ontology languages for engineering ontologies 
or knowledge bases. The languages are characterized by formal semantics 
and RDF/XML-based serializations for the Semantic Web. 
• OWL DL (Description Logic) designed to provide the maximum 
expressiveness possible while retaining computational completeness 
(either φ or ¬φ belong), decidability (there is an effective procedure to 
determine whether φ is derivable or not), and the availability of practical 
reasoning algorithms. OWL DL includes all OWL language constructs, but 
they can be used only under certain restrictions 
http://www.w3.org/TR/owl-ref/ OWL 2004 
http://www.w3.org/TR/owl2-overview/ OWL-2 2009
Why OWL? Limitations of RDFS 
• RDFS is too weak in describing resources with 
sufficient details, e.g.: 
– No localised range and domain constraints 
• Cannot say that the range of isToughtBy is only professor when applied to 
professors and lecturer when applied to lecturers 
– No cardinality constraints 
• Cannot say that a course is taught by at least one professor, or persons have 
exactly 2 parents 
– No transitive, inverse or symmetrical properties 
• Cannot say that isPartOf is a transitive property, that hasSupervisor is the 
inverse of isSupervisorOf, and, that friendOf is symmetrical 
– Disjoint classes 
• Cannot say that Graduate and PhD. Students are two disjoint classes 
– Boolean combinations of classes 
• Sometimes we may need to build new classes by combining other classes using 
union, intersection, and complement (e.g. person is the disjoint union of the 
classes male and female)
OWL Class and OWL Properties 
rdfs:Resource 
rdfs:Class rdf:Property 
owl:Class owl:ObjectProperty owl:DatatypeProperty
OWL on one Slide 
• Symmetric: if P(x, y) then P(y, x) 
• Transitive: if P(x,y) and P(y,z) then P(x, z) 
• Functional: if P(x,y) and P(x,z) then y=z 
• InverseOf: if P1(x,y) then P2(y,x) 
• InverseFunctional: if P(y,x) and P(z,x) then y=z 
• allValuesFrom: P(x,y) and y=allValuesFrom(C) 
• someValuesFrom: P(x,y) and y=someValuesFrom(C) 
• hasValue: P(x,y) and y=hasValue(v) 
• cardinality: cardinality(P) = N 
• minCardinality: minCardinality(P) = N 
• maxCardinality: maxCardinality(P) = N 
• equivalentProperty: P1 = P2 
• intersectionOf: C = intersectionOf(C1, C2, …) 
• unionOf: C = unionOf(C1, C2, …) 
• complementOf: C = complementOf(C1) 
• oneOf: C = one of(v1, v2, …) 
• equivalentClass: C1 = C2 
• disjointWith: C1 != C2 
• sameIndividualAs: I1 = I2 
• differentFrom: I1 != I2 
• AllDifferent: I1 != I2, I1 != I3, I2 != I3, … 
• Thing: I1, I2, … 
Legend: 
Properties are indicated by: P, P1, P2, etc 
Specific classes are indicated by: x, y, z 
Generic classes are indicated by: C, C1, C2 
Values are indicated by: v, v1, v2 
Instance documents are indicated by: I1, I2, I3, etc. 
A number is indicated by: N 
P(x,y) is read as: “property P relates x to y”
An Example 
• Woman ≡ Person ⊓ Female 
• Man ≡ Person ⊓ ØWoman 
• Mother ≡ Woman ⊓ $hasChild.Person 
• Father ≡ Man ⊓ $hasChild.Person 
• Parent ≡ Father ⊔ Mother 
• Grandmother ≡ Mother ⊓ $hasChild.Parent 
We can further infer (though not explicitly stated): 
 Grandmother ⊑ Person 
Grandmother ⊑ Man ⊔ Woman 
etc.
OWL-2 vs. OWL 
OWL-2 adds new functionality with respect to OWL.: 
• keys; 
• disjoint union of classes 
• property chains; 
• richer datatypes, data ranges; 
• qualified cardinality restrictions; 
• asymmetric, reflexive, and disjoint properties; 
• enhanced annotation capabilities .
Resources 
• W3C Documents 
– Guide: http://www.w3.org/TR/owl-guide/ 
– Reference: http://www.w3.org/TR/owl-ref/ 
– Semantics and Abstract Syntax: 
http://www.w3.org/TR/owl-semantics/ 
• OWL Tutorials 
– Ian Horrocks, Sean Bechhofer: 
http://www.cs.man.ac.uk/~horrocks/Slides/Innsbruck-tutorial/ 
– Roger L. Costello, David B. Jacobs: 
http://www.xfront.com/owl/ 
• Example Ontologies, e.g. here: 
http://www.daml.org/ontologies/
Tutorial: Designing Ontologies with 
Protégé 
• Protégé is an ontology editor and a 
knowledge-base editor (download 
from: 
http://protege.stanford.edu ). 
• Protégé is also an open-source, 
Java tool that provides an 
extensible architecture for the 
creation of customized knowledge-based 
applications. 
• Protégé's OWL Plug-in now 
provides support for editing 
Semantic Web ontologies. 
http://www.cs.jyu.fi/ai/vagan/ProtegeOWL_1.ppt 
http://www.cs.jyu.fi/ai/vagan/ProtegeOWL_2.ppt 
PLEASE !!! 
Download 
version: 
Protégé 3.5. 
http://www.cs.jyu.fi/ai/vagan/Ontologies.ppt
Download Protégé 3.5 http://protege.stanford.edu/
Restrictions of Monotonic Logic 
Semantic Web / Ontologies / OWL 
are based on the Open World 
Assumption: “everything is allowed 
if not explicitly prohibited” 
Databases / SQL / Prologue are 
based on the Closed World 
Assumption: “everything is 
prohibited if not explicitly allowed” 
Example: 
John loves Mary 
Q: John loves Mary? 
A: yes 
Q: Mary loves John? 
A: I do not know … 
Example: 
John loves Mary 
Q: John loves Mary? 
A: yes 
Q: Mary loves John? 
A: no 
Non-Monotonic Logic driven 
by the “negation as failure” rule is 
used for reasoning. For example 
“belief revision” can be applied as 
the process of changing beliefs to 
accommodate a new belief that 
might be inconsistent with the old 
ones. In the assumption that the 
new belief is correct, some of the 
old ones have to be retracted in 
order to maintain consistency. 
Monotonic Logic assumes that adding a formula to a theory never produces a reduction of its set of 
consequences, i.e., learning a new piece of knowledge cannot reduce the set of what is known. Therefore 
monotonic logic cannot handle various reasoning tasks such as: reasoning by default (consequences may 
be derived only because of lack of evidence of the contrary); abductive reasoning (consequences are only 
deduced as most likely explanations); belief revision (when new knowledge may contradict old beliefs), etc.
Example (formalised rules) 
Atomic predicates from the story: 
Let the initial state to be: 
R1: IF (P1ÙP4 ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2 ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
1. Mary will love John if he loves her and if 
he is not abusing Pete. 
2. Pete will consider Mary as his friend if she 
is not in love with John. 
3. Pete will not consider Mary as his friend if 
she is in love with John who is abusing him. 
4. John will stop loving Mary if she does not 
love him or she is a friend of Pete. 
5. Mary will stop loving John if he is abusing 
Pete. 
6. John being in bad mood will abuse Pete. 
7. John gets rid of bad mood if Mary loves 
him or if she is not a friend of Pete. 
8. John will fall in a bad mood if he loves 
Mary and she does not love him or vice versa. 
9. John will stop abusing Pete if he (John) 
does not love Mary any more or if she is not a 
friend of Pete. 
P1 = :John:loves :Mary . 
P2 = :Mary :loves :John . 
P3 = :Pete :hasFriend :Mary . 
P4 = :John :isAbusing :Pete . 
P5 = :John :hasBadMood ”true”. 
S(t0 ) =P1 Ù P2 ÙP3 Ù P4 Ù P5 
Formalized rules from the story: 
Rules as the story:
Hereinafter for the simplicity we will apply the rules synchronously ! 
Example (reasoning, 1-st step) 
loves 
John Mary 
Pete 
hasFriend 
S(t0 ) =P1 Ù P2 ÙP3 Ù P4 Ù P5 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
0 1 2 3 4 5 R9: IF ((P1ÚP3)ÙP4) THEN P4. S(t +t ) = P ÙP ÙP Ù P ÙP
Example (reasoning, 2-nd step) 
loves 
John Mary 
Pete 
hasFriend 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
hasBadMood 
S(t0 +t ) = P1 ÙP2 ÙP3 Ù P4 ÙP5 
S(t0 + 2×t ) = P1 ÙP2 ÙP3 ÙP4 Ù P5
Example (reasoning, 3-rd step) 
loves 
John Mary 
Pete 
hasFriend 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
isAbusing 
S(t0 + 2×t ) = P1 ÙP2 ÙP3 ÙP4 Ù P5 
S(t0 + 3×t ) = P1 Ù P2 Ù P3 Ù P4 ÙP5
Example (reasoning, 4-th step) 
John Mary 
Pete 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
hasBadMood 
S(t0 + 3×t ) = P1 Ù P2 Ù P3 Ù P4 ÙP5 
S(t0 + 4×t ) = P1 Ù P2 ÙP3 ÙP4 Ù P5
Example (reasoning, 5-th step) 
John Mary 
isAbusing hasFriend 
Pete 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
S(t0 + 4×t ) = P1 Ù P2 ÙP3 ÙP4 Ù P5 
S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5
Example (reasoning, reaching terminal 
state) 
John Mary 
Pete 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5 
hasFriend 
terminal state
Example (final “terminal” state) 
1. John does not love Mary. 
2. Mary does not love John. 
3. Mary is a friend of Pete. 
4. John is not abusing Pete. 
5. John is not in a bad mood. 
S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5
Example (another initial and in the 
same time terminal state) 
1. John loves Mary. 
2. Mary loves John. 
3. Mary is not a friend of Pete. 
4. John is not abusing Pete. 
5. John is not in a bad mood. 
to love 
John Mary 
S(t0 ) =P1 ÙP2 Ù P3 Ù P4 Ù P5 
to love 
Pete 
R1: IF (P1ÙP4ÙP2) THEN P 2; 
R2: IF (P2ÙP3) THEN P 3; 
R3: IF (P2ÙP4ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. terminal state
Example (two possible terminal 
states of the “love triangle”) 
to love 
John Mary 
to love 
Pete 
John Mary 
Pete 
to have a friend
Example (asynchronous reasoning tree) 
P1 Ù P2 ÙP3 Ù P4 Ù P5 
R1: IF (P1ÙP4 ÙP2) THEN P 2; 
R2: IF (P2 ÙP3) THEN P 3; 
R3: IF (P2 ÙP4 ÙP3) THEN P3; 
R4: IF ((P3ÚP2)ÙP1) THEN P1; 
R5: IF (P2 ÙP4) THEN P2; 
R6: IF (P5 ÙP4) THEN P 4; 
R7: IF ((P2ÚP3)ÙP5) THEN P5; 
R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 
R9: IF ((P1ÚP3)ÙP4) THEN P4. 
P1 ÙP2 ÙP3 Ù P4 Ù P5 
R1 R4 
R8 
P1 Ù P2 ÙP3 Ù P4 Ù P5 P1 Ù P2 ÙP3 Ù P4 ÙP5 
R4 
P1 ÙP2 ÙP3 Ù P4 Ù P5 
R1 
P1 ÙP2 ÙP3 Ù P4 ÙP5 
R6 
R4 
P1 Ù P2 ÙP3 Ù P4 ÙP5 P1 Ù P2 ÙP3 ÙP4 ÙP5 
R8 R4 R6 
P1 ÙP2 ÙP3 Ù P4 ÙP5 
P1 Ù P2 ÙP3 ÙP4 ÙP5 
R4 
R6 
P1 ÙP2 ÙP3 ÙP4 ÙP5 
R P1 ÙP2 Ù P3 ÙP4 ÙP5 9 
P1 ÙP2 ÙP3 ÙP4 Ù P5 
R5 
R3 
R7 
R5 R9 R7 
R3 
R8 
P1 Ù P2 Ù P3 ÙP4 ÙP5 P1 ÙP2 Ù P3 Ù P4 ÙP5 P1 ÙP2 Ù P3 ÙP4 Ù P5 
R5 
P1 Ù P2 ÙP3 ÙP4 Ù P5 
R8 
R9 
R2 
R7 
R6 RR 7 5 
P1 Ù P2 Ù P3 ÙP4 Ù P5 
P1 Ù P2 Ù P3 Ù P4 ÙP5 
R9 
R9 
P1 ÙP2 Ù P3 Ù P4 Ù P5 
R9 
R9 R2 
R2 
P1 Ù P2 Ù P3 Ù P4 Ù P5 
R6 
R7 
R9 
R2 
R8
http://www.w3.org/Submission/SWRL/
Semantic Rules in SWRL
SWRL Rule structure 
Contains an antecedent part (body), and a consequent (head). 
The body and head consist of positive conjunctions of atoms: 
Atom Ù Atom … → Atom Ù Atom … 
SWRL provides seven types of atoms: 
- Class Atoms owl:Class e.g., Person (?x), …, Person (John) 
- Individual Property atoms owl:ObjectProperty e.g., loves (?x, ?y), …, loves (John, Mary) 
- Data Valued Property atoms owl:DatatypeProperty e.g., hasAge(?x, 19), …, hasAge(Mary, 19) 
- Different Individuals atoms e.g., differentFrom(?x, ?y), …, 
- Same Individual atoms e.g., sameAs(?x, ?y), …, sameAs(John, ?y) 
- Built-in atoms (next slide) 
Person(?x) Ù hasSibling(?x,?y) Ù Man(?y) → hasBrother(?x,?y) 
antecedent consequent
SWRL built-ins 
Some mathematical operations 
Comparison of two datatypes swrlb:add (satisfied iff the first argument is equal to 
swrlb:equal 
swrlb:notEqual 
swrlb:lessThan 
swrlb:lessThanOrEqual 
swrlb:greaterThan 
swrlb:greaterThanOrEqual 
swrlb:stringEqualIgnoreCase 
(satisfied iff the first argument (string) is 
the same as the second argument 
(upper/lower case ignored)) 
the arithmetic sum of the second argument and the 
third argument) 
swrlb:subtract 
swrlb:multiply 
swrlb:divide 
swrlb:pow (satisfied iff the first argument is equal 
to the result of the second argument raised to the third 
argument power) 
swrlb:abs (satisfied iff the first argument is the 
absolute value of the second argument) 
swrlb:round (satisfied iff the first argument is equal 
to the nearest number to the second argument with no 
fractional part) 
swrlb:booleanNot (satisfied iff the first argument is 
true and the second argument is false, or vice versa. 
Read more in: 
http://www.w3.org/Submission/SWRL/
Examples of SWRL Rules (1) 
Rule computes age of a person from the current year and 
the date of birth: 
Person(?x) Ù hasYearOfBirth(?x, ?yborn) Ù hasCurrentYear(?x,?ycurrent) Ù 
Ù swrlb:subtract(?age, ?ycurrent, ?yborn) ® 
® hasAgeYears(?x,?age)
Examples of SWRL Rules 
A researcher, which Hirsch-index (citation index) is more 
than amount of years in her academic career, is a good 
researcher: 
Researcher(?x) Ù hasHindexOfPublications(?x, ?hirschindex) Ù 
Ù hasYearsInCareer(?x, ?years) Ù swrlb:greaterThan(?hirschindex,?years) ® 
® GoodResearcher(?x)
Examples of SWRL Rules 
A person of age between 29-55 would have an extra weight 
equal to positive difference between his/her weight in kilos 
and his/her height in centimeters (minus 100): 
Person(?x) Ù hasAgeYears(?x,?age) Ù swrlb:greaterThan(?age, 28) Ù 
Ù swrlb:lessThan(?age, 56) Ù hasWeightKg(?x, ?weight) Ù hasLengthSm(?x, ?length) Ù 
Ù swrlb:subtract(?ideal, ?length, 100) Ù swrlb:subtract(?extra, ?weight, ?ideal) Ù 
Ù swrlb:greaterThan(?extra, 0) ® 
® hasExtraWeightKg(?x, ?extra)
Examples of SWRL Rules 
A person of age between 29-55 would have a lacking weight 
equal to positive difference between his/her height in 
centimeters (minus 100) and his/her weight in kilos: 
Person(?x) Ù hasAgeYears(?x,?age) Ù swrlb:greaterThan(?age, 28) Ù 
Ù swrlb:lessThan(?age, 56) Ù hasWeightKg(?x, ?weight) Ù hasLengthSm(?x, ?length) Ù 
Ù swrlb:subtract(?ideal, ?length, 100) Ù swrlb:subtract(?lacking, ?ideal, ?weight) Ù 
Ù swrlb:greaterThan(?lacking, 0) ® 
® hasLackingWeightKg(?x, ?lacking)

Contenu connexe

Tendances

Introduction to linked data and the semantic web
Introduction to linked data and the semantic webIntroduction to linked data and the semantic web
Introduction to linked data and the semantic webDave Reynolds
 
Semantic Technolgy
Semantic TechnolgySemantic Technolgy
Semantic TechnolgyTalat Fakhri
 
Semantic Web Technology and Ontology designing for e-Learning Environments
Semantic Web Technology and Ontology designing for e-Learning EnvironmentsSemantic Web Technology and Ontology designing for e-Learning Environments
Semantic Web Technology and Ontology designing for e-Learning EnvironmentsRobin Khanna
 
An Introduction to Semantic Web Technology
An Introduction to Semantic Web TechnologyAn Introduction to Semantic Web Technology
An Introduction to Semantic Web TechnologyAnkur Biswas
 
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)Benjamin Nowack
 
Information Intermediaries
Information IntermediariesInformation Intermediaries
Information IntermediariesDave Reynolds
 
Realizing a Semantic Web Application - ICWE 2010 Tutorial
Realizing a Semantic Web Application - ICWE 2010 TutorialRealizing a Semantic Web Application - ICWE 2010 Tutorial
Realizing a Semantic Web Application - ICWE 2010 TutorialEmanuele Della Valle
 
Linked Data Hypercubes
Linked Data HypercubesLinked Data Hypercubes
Linked Data HypercubesDave Reynolds
 
Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Museums Computer Group
 
Linked data MLA 2015
Linked data MLA 2015Linked data MLA 2015
Linked data MLA 2015Cason Snow
 
Linked Data MLA 2015
Linked Data MLA 2015Linked Data MLA 2015
Linked Data MLA 2015Cason Snow
 
Subject information gateway in information technology (sigit) an introduction
Subject information gateway in information technology (sigit) an introductionSubject information gateway in information technology (sigit) an introduction
Subject information gateway in information technology (sigit) an introductionkmusthu
 
Desinging a library portal madhu
Desinging a library portal  madhuDesinging a library portal  madhu
Desinging a library portal madhukmusthu
 
Semantic Annotation: The Mainstay of Semantic Web
Semantic Annotation: The Mainstay of Semantic WebSemantic Annotation: The Mainstay of Semantic Web
Semantic Annotation: The Mainstay of Semantic WebEditor IJCATR
 
Informational web pages
Informational web pagesInformational web pages
Informational web pagesyhen06
 
Gt health2stat 7-22-2010
Gt health2stat 7-22-2010Gt health2stat 7-22-2010
Gt health2stat 7-22-2010George Thomas
 
Quality aware subgraph matching over inconsistent probabilistic graph databases
Quality aware subgraph matching over inconsistent probabilistic graph databasesQuality aware subgraph matching over inconsistent probabilistic graph databases
Quality aware subgraph matching over inconsistent probabilistic graph databasesieeechennai
 
Lodlam saa 2011_jenelfarrell_2
Lodlam saa 2011_jenelfarrell_2Lodlam saa 2011_jenelfarrell_2
Lodlam saa 2011_jenelfarrell_2Jenel Farrell
 

Tendances (20)

Introduction to linked data and the semantic web
Introduction to linked data and the semantic webIntroduction to linked data and the semantic web
Introduction to linked data and the semantic web
 
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
Hacia la Internet del Futuro: Web Semántica y Open Linked Data, Parte 2
 
Semantic Technolgy
Semantic TechnolgySemantic Technolgy
Semantic Technolgy
 
Semantic Web Technology and Ontology designing for e-Learning Environments
Semantic Web Technology and Ontology designing for e-Learning EnvironmentsSemantic Web Technology and Ontology designing for e-Learning Environments
Semantic Web Technology and Ontology designing for e-Learning Environments
 
An Introduction to Semantic Web Technology
An Introduction to Semantic Web TechnologyAn Introduction to Semantic Web Technology
An Introduction to Semantic Web Technology
 
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
RDF and SPARQL for PHP Developers (at New York Semantic Web Meetup)
 
Information Intermediaries
Information IntermediariesInformation Intermediaries
Information Intermediaries
 
Realizing a Semantic Web Application - ICWE 2010 Tutorial
Realizing a Semantic Web Application - ICWE 2010 TutorialRealizing a Semantic Web Application - ICWE 2010 Tutorial
Realizing a Semantic Web Application - ICWE 2010 Tutorial
 
Linked Data Hypercubes
Linked Data HypercubesLinked Data Hypercubes
Linked Data Hypercubes
 
Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?
 
Linked data MLA 2015
Linked data MLA 2015Linked data MLA 2015
Linked data MLA 2015
 
Linked Data MLA 2015
Linked Data MLA 2015Linked Data MLA 2015
Linked Data MLA 2015
 
Subject information gateway in information technology (sigit) an introduction
Subject information gateway in information technology (sigit) an introductionSubject information gateway in information technology (sigit) an introduction
Subject information gateway in information technology (sigit) an introduction
 
Desinging a library portal madhu
Desinging a library portal  madhuDesinging a library portal  madhu
Desinging a library portal madhu
 
Semantic Annotation: The Mainstay of Semantic Web
Semantic Annotation: The Mainstay of Semantic WebSemantic Annotation: The Mainstay of Semantic Web
Semantic Annotation: The Mainstay of Semantic Web
 
Using The Semantic Web
Using The Semantic WebUsing The Semantic Web
Using The Semantic Web
 
Informational web pages
Informational web pagesInformational web pages
Informational web pages
 
Gt health2stat 7-22-2010
Gt health2stat 7-22-2010Gt health2stat 7-22-2010
Gt health2stat 7-22-2010
 
Quality aware subgraph matching over inconsistent probabilistic graph databases
Quality aware subgraph matching over inconsistent probabilistic graph databasesQuality aware subgraph matching over inconsistent probabilistic graph databases
Quality aware subgraph matching over inconsistent probabilistic graph databases
 
Lodlam saa 2011_jenelfarrell_2
Lodlam saa 2011_jenelfarrell_2Lodlam saa 2011_jenelfarrell_2
Lodlam saa 2011_jenelfarrell_2
 

En vedette

Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)Rensselaer Polytechnic Institute
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)Dan Brickley
 
Resource description framework
Resource description frameworkResource description framework
Resource description frameworkhozifa1010
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEDiana Maynard
 
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...Mark Birbeck
 
Text analysis and Semantic Search with GATE
Text analysis and Semantic Search with GATEText analysis and Semantic Search with GATE
Text analysis and Semantic Search with GATEDiana Maynard
 
Dart the better Javascript 2015
Dart the better Javascript 2015Dart the better Javascript 2015
Dart the better Javascript 2015Jorg Janke
 
RDF et web sémantique en 5 minutes chrono
RDF et web sémantique en 5 minutes chronoRDF et web sémantique en 5 minutes chrono
RDF et web sémantique en 5 minutes chronobmarchal
 

En vedette (8)

Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)
 
Resource description framework
Resource description frameworkResource description framework
Resource description framework
 
Text Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATEText Analysis and Semantic Search with GATE
Text Analysis and Semantic Search with GATE
 
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...A First Course in RDF and RDFS (Resource Description Framework and Resource D...
A First Course in RDF and RDFS (Resource Description Framework and Resource D...
 
Text analysis and Semantic Search with GATE
Text analysis and Semantic Search with GATEText analysis and Semantic Search with GATE
Text analysis and Semantic Search with GATE
 
Dart the better Javascript 2015
Dart the better Javascript 2015Dart the better Javascript 2015
Dart the better Javascript 2015
 
RDF et web sémantique en 5 minutes chrono
RDF et web sémantique en 5 minutes chronoRDF et web sémantique en 5 minutes chrono
RDF et web sémantique en 5 minutes chrono
 

Similaire à Semantic web

Semantic web technology
Semantic web technologySemantic web technology
Semantic web technologyStanley Wang
 
IRJET- Semantic Web Mining and Semantic Search Engine: A Review
IRJET- Semantic Web Mining and Semantic Search Engine: A ReviewIRJET- Semantic Web Mining and Semantic Search Engine: A Review
IRJET- Semantic Web Mining and Semantic Search Engine: A ReviewIRJET Journal
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data TutorialSören Auer
 
Linked data HHS 2015
Linked data HHS 2015Linked data HHS 2015
Linked data HHS 2015Cason Snow
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Researchadameq
 
emantic web technologies and applications for Ins
emantic web technologies and applications for Insemantic web technologies and applications for Ins
emantic web technologies and applications for InsTemesgenHabtamu
 
Semantic Web: Technolgies and Applications for Real-World
Semantic Web: Technolgies and Applications for Real-WorldSemantic Web: Technolgies and Applications for Real-World
Semantic Web: Technolgies and Applications for Real-WorldAmit Sheth
 
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...Artificial Intelligence Institute at UofSC
 
Semantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic FormsSemantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic FormsSergeyChernyshev
 
Semantic web and Linked Data
Semantic web and Linked DataSemantic web and Linked Data
Semantic web and Linked DataHyun Namgoong
 

Similaire à Semantic web (20)

Semantic web technology
Semantic web technologySemantic web technology
Semantic web technology
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Semantic web
Semantic webSemantic web
Semantic web
 
IRJET- Semantic Web Mining and Semantic Search Engine: A Review
IRJET- Semantic Web Mining and Semantic Search Engine: A ReviewIRJET- Semantic Web Mining and Semantic Search Engine: A Review
IRJET- Semantic Web Mining and Semantic Search Engine: A Review
 
Gt ea2009
Gt ea2009Gt ea2009
Gt ea2009
 
The Social Data Web
The Social Data WebThe Social Data Web
The Social Data Web
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 
Linked data HHS 2015
Linked data HHS 2015Linked data HHS 2015
Linked data HHS 2015
 
Treinamento 1
Treinamento 1Treinamento 1
Treinamento 1
 
1
11
1
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Linked Data to Improve the OER Experience
Linked Data to Improve the OER ExperienceLinked Data to Improve the OER Experience
Linked Data to Improve the OER Experience
 
Corrib.org - OpenSource and Research
Corrib.org - OpenSource and ResearchCorrib.org - OpenSource and Research
Corrib.org - OpenSource and Research
 
we to deep learning
we to deep learning we to deep learning
we to deep learning
 
emantic web technologies and applications for Ins
emantic web technologies and applications for Insemantic web technologies and applications for Ins
emantic web technologies and applications for Ins
 
Semantic Web: Technolgies and Applications for Real-World
Semantic Web: Technolgies and Applications for Real-WorldSemantic Web: Technolgies and Applications for Real-World
Semantic Web: Technolgies and Applications for Real-World
 
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...
Relationships at the Heart of Semantic Web: Modeling, Discovering, Validating...
 
Semantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic FormsSemantic Media Wiki & Semantic Forms
Semantic Media Wiki & Semantic Forms
 
Semantic web
Semantic webSemantic web
Semantic web
 
Semantic web and Linked Data
Semantic web and Linked DataSemantic web and Linked Data
Semantic web and Linked Data
 

Dernier

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Dernier (20)

Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Semantic web

  • 1. SSeemmaannttiicc WWeebb:: SSttaattee ooff tthhee AArrtt aanndd OOppppoorrttuunniittiieess Aatif Hussain Warraich Compiled, partly based on various online tutorials and presentations, with respect to their authors University of Engineering and Technology, Lahore
  • 2. Where we are Today: the Syntactic Web [Hendler & Miller 02]
  • 3. MMoosstt ooff tthhee CCuurrrreenntt WWeebb ((dduummbb lliinnkkss))
  • 4. SSeemmaannttiicc WWeebb ((ddaattaa ccoonnnneecctteedd bbyy rreellaattiioonnsshhiippss))
  • 5. AApppprrooaacchh:: SSeemmaannttiicc WWeebb “The Semantic Web is a vision: the idea of having data on the Web defined and linked in a way that it can be used by machines not just for display purposes, but for automation, integration and reuse of data across various applications” http://www.w3.org/sw/ The Semantic Web is an initiative with the goal of extending the current Web and facilitating Web automation, universally accessible web resources, and the 'Web of Trust', providing a universally accessible platform that allows data to be shared and processed by automated tools as well as by people.
  • 6. Tim Berners-Lee's Vision of Semantic Web (IJCAI-01)
  • 7. Semantic Web Stack (updated, W3C, 2006)
  • 8. SSeemmaannttiicc WWeebb:: NNeeww ““UUsseerrss”” Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents
  • 9. Semantic Web: Annotations Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents Semantic annotations are specific sort of metadata, which provides information about particular domain objects, values of their properties and relationships, in a machine-processable, formal and standardized way.
  • 10. Semantic Web: Ontologies Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents Ontologies make metadata interoperable and ready for efficient sharing and reuse. It provides shared and common understanding of a domain, that can be used both by people and machines. Ontologies are used as a form of agreement-based knowledge representation about the world or some part of it and generally describe: domain individuals, classes, attributes, relations and events.
  • 11. Semantic Web: Rules Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents Logical support in form of rules is needed to infer implicit content, metadata and ontologies from the explicit ones. Rules are considered to be a major issue in the further development of the semantic web. On one hand, they can be used in ontology languages, in conjunction with or as an alternative to description logics. And on the other hand, they will act as a means to draw inferences, to configure systems, to express constraints, to specify policies, to react to events/changes, to transform data, to specify behavior of agents, etc.
  • 12. Semantic Web: Languages Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents Languages are needed for machine-processable formal descriptions of: metadata (annotations) like e.g. RDF; ontologies like e.g. OWL.; rules like e.g. RuleML. The challenge is to provide a framework for specifying the syntax (e.g. XML) and semantics of all of these languages in a uniform and coherent way. The strategy is to translate the various languages into a common 'base' language (e.g. CL or Lbase) providing them with a single coherent model theory.
  • 13. Semantic Web: Tools Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents User-friendly tools are needed for metadata manual creation (annotating content) or automated generation, for ontology engineering and validation, for knowledge acquisition (rules), for languages parsing and processing, etc.
  • 14. Semantic Web: Applications and Services Semantic Users Web and Beyond Semantic Annotations Ontologies Logical Support Languages Tools Applications / Services WWW Creators Users and Beyond Web content Semantic Web Semantic Web content Creators applications agents Utilization of Semantic Web metadata, ontologies, rules, languages and tools enables to provide scalable Web applications and Web services for consumers and enterprises" making the web 'smarter' for people and machines.
  • 15. The Semantic Web The Ontology Articulation Toolkit helps agents to understand unknown ontologies
  • 16. Semantic Web basics…  RDF: • is a W3C standard, which provides tool to describe Web resources • provides interoperability between applications that exchange machine-understandable information  RDF Schema: – is a W3C standard which defines vocabulary for RDF – organizes this vocabulary in a typed hierarchy – capable to explicitly declare semantic relations between vocabulary terms
  • 17. RDF – Semantic Web over Web Resources Mary Director Secretary has_job to_be_in_ love_with has_job John has_homepage has_homepage OOnnttoollooggyy
  • 18. Resources • All things being described by RDF expressions are called resources: – entire Web page; – a specific XML element; – whole collection of pages; – an object that is not directly accessible via the Web.
  • 19. 26 RDF Statement Property_k Resource_i Value_n Resource_i Property_r Resource_ j OR
  • 20. Semantic Relation as RDF statement (so called “object property”) Personal web page of Terziyan V. Web page of Agora Center 27 Lk Ai Aj Relation (i ¹ j) http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.html refers_to Resource Relation Resource Subject Predicate object URI of Terziyan V. employed_by http://www.cs.jyu.fi/ai/vagan/#vagan URI of Agora Center http://www.jyu.fi/agora-center/#AC Dereferenceable URI (“Hash vs. Slash”)
  • 21. Semantic Property as RDF statement (so called “datatype property”) 28 Personal web page of Terziyan V. http://www.cs.jyu.fi/ai/vagan/index.html Literal Literal Resource has_birthday Property Subject Predicate object Ai Lk Property (i = j) 15.02.2000 “Birthday” of the web-page URI of Terziyan V. has_birthday http://www.cs.jyu.fi/ai/vagan/#vagan 27.12.1958 Dereferenceable URI (“Hash vs. Slash”) Birthday of Terziyan V.
  • 22. Semantic Network of Web Resources 15.02.2000 has_birthday Personal web page of Terziyan V. Web page of Agora Center http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.html 29 refers_to isWebPageOf 27.12.1958 isWebPageOf URI of Terziyan V. employed_by URI of Agora Center http://www.cs.jyu.fi/ai/vagan/#vagan http://www.jyu.fi/agora-center/#AC hasWebPage hasWebPage has_birthday
  • 23. http://www.kture.kharkov.ua/ 30 From Hyperlinks to Semantic Web http://www.cs.jyu.fi/ai/ university international _contacts http://www.cs.jyu.fi/ai/contacts.html
  • 24. Resources and URIs • A resource can be anything that has identity • Uniform Resource Identifiers (URI)* provide a simple and extensible means for identifying a resource • Not all resources are network "retrievable"; e.g., human beings, corporations, and books in a library can also be considered resources * The term "Uniform Resource Locator" (URL) refers to the subset of URI that identify resources via a representation of their primary access mechanism (e.g., their network "location"), rather than identifying the resource by name or by some other attribute(s) of that resource.
  • 25. URI vs. URL A URI represents a single concept or thing, but many URIs can represent the same thing. All URLs are URIs. Not all URIs are URLs. URI identifies something uniquely. URL not only identifies something, but also describes where it is located. Venn diagram of Uniform Resource Identifier (URI) scheme categories. Schemes in the URL (locator) and URN (name) categories both function as resource IDs, so URL and URN are subsets of URI. They are also, generally, disjoint sets. However, many schemes can't be categorized as strictly one or the other, because all URIs can be treated as names, and some schemes embody aspects of both categories – or neither.
  • 26. URL vs. URI example URI of Vagan Terziyan in Nordea Database: http://www.NordeaDB.fi/#VaganTerziyan URI of Vagan Terziyan in the Central Hospital Database: http://www.JKL_Central_Hospital_DB.fi/#VaganTerziyan URL of Vagan Terziyan record in Nordea Database: http://www.NordeaDB.fi/VaganTerziyanRecord URL of Vagan Terziyan record in the Central Hospital Database: http://www.JKL_Central_Hospital_DB.fi/VaganTerziyanRecord ?
  • 27. Dereferenceable URI The term Linked Data is used to describe a method of exposing, sharing, and connecting data via dereferenceable* URIs on the Web. Linked Data is about using the Web to connect related data that wasn’t previously linked, or using the Web to lower the barriers to linking data currently linked using other methods. More specifically, Wikipedia defines Linked Data as a term used to describe a recommended best practice for exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF. Linked Data aims to extend the Web with a data commons by publishing various open datasets as RDF on the Web and by setting RDF links between data items from different data sources. *A dereferenceable Uniform Resource Identifier or dereferenceable URI is a resource retrieval mechanism that uses any of the internet protocols (e.g. HTTP) to obtain a copy or representation of the resource it identifies. In the context of traditional HTML web pages, this is the normal and obvious way of working: A URI refers to the page, and when requested the web server returns a copy of it. In other non-dereferenceable contexts, such as XML Schema, the namespace identifier is still a URI, but this is simply an identifier (i.e. a namespace name). There is no intention that this can or should be dereferenced. There is even a separate attribute, schemaLocation, which may contain a dereferenceable URI that does point to a copy of the schema document. In the case of Linked Data, the representation takes the form of a document (typically HTML or XML) that describes the resource that the URI identifies. In either case, the mechanism makes it possible for a user (or software agent) to "follow your nose" to find out more information related to the identified resource. http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html
  • 28. Relationships between URIs illustrated The picture shows a Big Lynx film team at work. Within the picture, Big Lynx Lead Cameraman Matt Briggs as well as his two assistants, Linda Meyer and Scott Miller, are identified by HTTP URIs from the Big Lynx namespace. The relationship, that they know each other, is represented by connecting lines having the relationship type http://xmlns.com/foaf/0.1/knows. [source: http://linkeddatabook.com/editions/1.0/ ]
  • 29. RDF Statement • Subject of an RDF statement is a resource • Predicate of an RDF statement is a property of a resource • Object of an RDF statement is the value of a property of a resource
  • 30. Example of RDF Statement Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. Subject (resource) http://www.w3.org/Home/Lassila Predicate (property) Creator Object (literal) “Ora Lassila” Lets represent the above statement in RDF/XML in accordance with the “serialization” and the “abbreviated” syntax (see next slides):
  • 31. RDF Example in serialization syntax (subject of statement) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:RDF> <rdf:Description rdf:about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description> </rdf:RDF> Subject
  • 32. RDF Example in serialization syntax (predicate of statement) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:RDF> <rdf:Description rdf:about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description> </rdf:RDF> Predicate
  • 33. RDF Example in serialization syntax (object of statement) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:RDF> <rdf:Description rdf:about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description> </rdf:RDF> Object
  • 34. RDF Example in serialization syntax (reference to ontology) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:RDF> <rdf:Description rdf:about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description> </rdf:RDF> a specific namespace prefix as reference to ontology where predicates are defined, e.g. xmlns: s="http://description.org/schema/"
  • 35. Full XML Document in serialization syntax for the Example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22- rdf-syntax-ns#" xmlns:s="http://description.org/schema/" > <rdf:Description rdf:about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description> </rdf:RDF> Namespaces
  • 36. Template/frame for RDF/XML statement (1) Subject (URI) p Ontology (URI) Value p Predicat p e Predicat e Value Predicate Subject
  • 37. Template/frame for RDF/XML statement (2) p Ontology (URI) p Subject (URI) Object (URI) Predicate Subject Object
  • 38. RDF/XML Online Validator http://www.w3.org/RDF/Validator/
  • 39. Abbreviated Syntax Example (1) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:RDF> <rdf:Description rdf:about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" /> </rdf:RDF> <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <rdf:Description rdf:about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila"/> </rdf:RDF>
  • 40. Abbreviated Syntax Example (2) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. Subject <rdf:Description rdf:about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" />
  • 41. Abbreviated Syntax Example (3) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:Description rdf:about="http://www.w3.org/Home/Lassila" s:Creator ="Ora Lassila" /> Predicate
  • 42. Abbreviated Syntax Example (4) Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. <rdf:Description rdf:about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" /> Object
  • 43. Template/frame for RDF statement <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns: = " " > <rdf:Description rdf:about= " “ " : = " " /> </rdf:RDF> Ontology (URI) Predicat Value e prefix Subject (URI) prefi x Value Predicate Subject
  • 44. RDF N3 syntax • Notation3, or N3 as it is more commonly known, is a shorthand non-XML serialization of RDF models, designed with human-readability in mind: N3 is much more compact and readable than XML RDF notation. The format is being developed by Tim Berners-Lee and others from the Semantic Web community. RDF sample in XML notation RDF sample in N3 notation http://www.w3.org/TeamSubmission/n3/
  • 45. RDF N3 syntax Some fast hints: All URIs are quoted with angle brackets ( “<“ and “>” ). Whitespace within the < > is to be ignored. All values are within " " . Each statement ends with “.” @pref is used to define the namespace prefix. [ ] are used for the “blank nodes”. Check all in : http://www.w3.org/TeamSubmission/n3/ Shorthand: Example: @PREFIX dc: <http://purl.org/dc/elements/1.1/> . <http://en.wikipedia.org/wiki/Tony_Benn> dc:publisher "Wikipedia" . Square brackets for blank nodes: [ pl ] means x, where there exists some x such that x has properties in the property list pl. For example: [ :firstname "Ora" ] dc:wrote [ dc:title "Moby Dick" ] . … is a statement which would be means in math: exists x, y . firstname(x, "Ora") & dc:wrote(x,y) & dc:title (y, "Moby Dick") … or in English "Some person who has a first name Ora wrote a book entitled "Moby Dick". Note not "the book" or "the person".
  • 46. Template/frame for RDF statement (N3) Predicate Subject Object Predicate OR Subject Value Subject < (URI) > < Predicate (URI) > < Object (URI) > . OR Subject (URI) < > < Predicate (URI) > " Value " . OR @prefix Onto: < Ontology (URI) > . Onto : Subject Onto : Predicate Onto : Object . Onto : Subject Onto : Predicate " Value " .
  • 47. Some N3 syntax specifics http://www.w3.org/TeamSubmission/n3/ Ontological statements in N3 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . :Professor a rdfs:Class . <http://www.cs.jyu.fi/ai/vagan> a :Professor .
  • 48. RDF N3 examples The story 4 RDF (N3) statements 1. Gender of Vagan Terziyan is male. 2. His mother is Svetlana Terziyan. 3. He is fun of fishing. 4. He is fun of Nordic walking. <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > "male" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan > . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "Fishing" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "NordicWalking" .
  • 49. RDF N3 examples 1. Gender of Vagan Terziyan is male. 2. His mother is Svetlana Terziyan. 3. He is fun of fishing. 4. He is fun of Nordic walking. <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > "male" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan > . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "Fishing" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "NordicWalking" . Reader-friendly version @prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . @prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . On1:VaganTerziyan On1:hasGender "male" . On1:VaganTerziyan On1:hasMother On1:SvetlanaTerziyan . On1:VaganTerziyan On2:isFunOf "Fishing" . On1:VaganTerziyan On2:isFunOf "NordicWalking" .
  • 50. RDF N3 examples 1. Gender of Vagan Terziyan is male. 2. His mother is Svetlana Terziyan. 3. He is fun of fishing. 4. He is fun of Nordic walking. <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > "male" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan > . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "Fishing" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "NordicWalking" . Compact version @prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . @prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . On1:VaganTerziyan On1:hasGender "male" ; On1:hasMother On1:SvetlanaTerziyan ; On2:isFunOf "Fishing" , "NordicWalking" .
  • 51. Online RDF translator http://rdf-translator.appspot.com/
  • 52. … lets validate the translation http://www.w3.org/RDF/Validator/
  • 53. Online RDF translator (“Ora Lassila” example) http://rdf-translator.appspot.com/
  • 54. RDF/N3 example (blank node with [ ]) 1. Gender of Vagan Terziyan is male. 2. His mother is Svetlana Terziyan. 3. He is fun of fishing. 4. He is fun of Nordic walking. 5. He is fun of mother’s hobby. <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasGender > "male" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#hasMother> <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan > . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "Fishing" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> "NordicWalking" . <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#VaganTerziyan> < http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isFunOf> [<http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#isHobbyOf> < http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#SvetlanaTerziyan>]. Compact version @prefix On1: <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . @prefix On2: <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . On1:VaganTerziyan On1:hasGender "male" ; On1:hasMother On1:SvetlanaTerziyan ; On2:isFunOf "Fishing" , "NordicWalking" , [On2:isHobbyOf On1:SvetlanaTerziyan ] .
  • 55. … lets translate it to RDF/XML … http://rdf-translator.appspot.com/
  • 56. … and check with RDF/XML validator http://www.w3.org/RDF/Validator/
  • 57. What is an ontology? Studer(98): Formal, explicit specification of a shared conceptualization Machine readable Concepts, properties, functions, axioms are explicitly defined Consensual knowledge Abstract model of some domain
  • 58. 66 What is an Ontology? A model of (some aspect of) the world • Introduces vocabulary relevant to domain, e.g.: – Anatomy From: Ian Horrocks “OWL 2: The Next Generation”
  • 59. 67 What is an Ontology? A model of (some aspect of) the world • Introduces vocabulary relevant to domain • Specifies meaning of terms Heart is a muscular organ that is part of the circulatory system From: Ian Horrocks “OWL 2: The Next Generation”
  • 60. 68 What is an Ontology? A model of (some aspect of) the world • Introduces vocabulary relevant to domain • Specifies meaning of terms Heart is a muscular organ that is part of the circulatory system • Formalised using suitable logic From: Ian Horrocks “OWL 2: The Next Generation”
  • 61. Ontology Elements • Concepts(classes) + their hierarchy • Concept properties (slots/attributes) + their hierarchy • Property restrictions (type, cardinality, domain …) • Relations between concepts (disjoint, equality …) • Instances
  • 62. 70 DL Semantics Semantics given by standard FO model theory: John Mary Lawyer Doctor Vehicle hasChild owns (Lawyer and Doctor) From: Ian Horrocks “OWL: A Description Logic Based Ontology Language”
  • 63. RDF Schema (language for simple ontologies) RDF schema is a semantic extension of RDF used for simple ontologies’ design. The RDF schema language is used for declaring basic class and types when describing the terms used in RDF and are used to determine characteristics of other resources, such as the domains and ranges of properties. • rdfs:Resource • rdfs:Class • rdfs:domain • rdfs:range • rdfs:subClassOf • rdfs:subPropertyOf • … RDF Schema provides a data-modelling vocabulary for RDF data. http://www.w3.org/TR/rdf-schema/ The RDF Schema class and property system is similar to the type systems of object-oriented programming languages such as Java. RDF Schema differs from many such systems in that instead of defining a class in terms of the properties its instances may have, RDF Schema describes properties in terms of the classes of resource to The namespace is identified by: which they apply. http://www.w3.org/2000/01/rdf-schema#
  • 64. RDFS example … :Mary :hasHusband :John . … :hasSpooth rdf:type :hasHusband rdf:property rdfs:Domain rdfs:Range :Woman :Man :Person rdfs:subClassOf rdfs:subPropertyOf rdfs:Domain rdfs:Range rdf:type rdfs:Class rdf:type rdf:type :John :Mary rdf:type rdf:type RDFS :hasHusband RDF rdfs:subClassOf rdf:type
  • 65. RDFS example @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix : <http://www.cs.jyu.fi/ai/vagan/ontologies/LifeInFinland.owl#> . :Person a rdfs:Class . :Woman a rdfs:Class . :Man a rdfs:Class . :Woman rdfs:subClassOf :Person . :Man rdfs:subClassOf :Person . :hasHusband a rdf:Property . :hasSpooth a rdf:Property . :hasHusband rdfs:subPropertyOf :hasSpooth . :hasSpooth rdfs:domain :Person . :hasSpooth rdfs:range :Person . :hasHusband rdfs:domain :Woman . :hasHusband rdfs:range :Man . :John a :Man . :Mary a :Woman . :Mary :hasHusband :John .
  • 66. RDFS example (translate to RDF/XML) http://rdf-translator.appspot.com/
  • 67. … and validate RDF/XML http://www.w3.org/RDF/Validator/
  • 68. RDFS example (continue) Adding some “cosmetics” from OWL (Web Ontology Language): @base <http://www.cs.jyu.fi/ai/vagan/LifeInFinland.owl> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix : <http://www.cs.jyu.fi/ai/vagan/LifeInFinland.owl#> . :Person a rdfs:Class . :Woman a rdfs:Class . :Man a rdfs:Class . :Woman rdfs:subClassOf :Person . :Man rdfs:subClassOf :Person . :hasSpooth a owl:ObjectProperty . :hasHusband a owl:ObjectProperty . :hasHusband rdfs:subPropertyOf :hasSpooth . :hasSpooth rdfs:domain :Person . :hasSpooth rdfs:range :Person . :hasHusband rdfs:domain :Woman . :hasHusband rdfs:range :Man . :John a :Man . :Mary a :Woman . :Mary :hasHusband :John .
  • 69. … then we got translation to RDF/XML http://rdf-translator.appspot.com/
  • 70. … validating RDF/XML http://www.w3.org/RDF/Validator/
  • 71. … then we publish RDF/XML as OWL file to the right place in the Web
  • 72. Opening file in Protégé (Screenshot 1)
  • 73. Opening file in Protégé (Screenshot 2)
  • 74. Dublin Core • A set of fifteen basic properties for describing generalised Web resources; • ISO Standard 15836-2003 (February 2003) and ANSI/NISO Z39.85-2012 (February 2013) : http://www.niso.org/apps/group_public/download.php/10 256/Z39-85-2012_dublin_core.pdf The Dublin Core Metadata Initiative is an open forum engaged in the development of interoperable online metadata standards that support a broad range of purposes and business models. Namespace: @prefix dc: http://purl.org/dc/elements/1.0/ . http://dublincore.org/
  • 75. Dublin Core (15 basic properties): 83
  • 76. Dublin Core Example (RDF/XML) <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.0/"> <rdf:Description rdf:about="http://www.ukoln.ac.uk/metadata/resources/dc/datamodel/WD-dc-rdf/"> <dc:title> Guidance on expressing the Dublin Core within the RDF </dc:title> <dc:creator> Eric Miller </dc:creator> <dc:creator> Paul Miller </dc:creator> <dc:creator> Dan Brickley </dc:creator> <dc:subject> Dublin Core; RDF; XML </dc:subject> <dc:publisher> Dublin Core Metadata Initiative </dc:publisher> <dc:contributor> Dublin Core Data Model Working Group </dc:contributor> <dc:date> 1999-07-01 </dc:date> <dc:format> text/html </dc:format> <dc:language> en </dc:language> </rdf:Description> </rdf:RDF>
  • 77. Dublin Core Example (RDF/N3) Obtained with: http://rdf-translator.appspot.com/
  • 78. RDF (as a Linked Data) Illustrated C Properties (predicate) HUMAN #Vagan Vagan Terziyan 27/12/58 #JyU #John #Aino … Resources (subject) hasBirthday isEmployedBy hasName hasSurname :#JyU a UNIVERSITY :#JyU :hasTitle “University of Jyvaskyla” :#JyU :hasLocation “Finland” :#JyU :hasWorldRank “204” :#JyU :hasRector :#Aino RDF triples :#Vagan a HUMAN :#Vagan :hasName “Vagan” :#Vagan :hasSurname “Terziyan” :#Vagan :hasBirthday “27/12/58” :#Vagan :isEmployedBy :#JyU C UNIVERSITY #MIT #JyU University of Jyvaskyla Finland 204 #Aino #KNURE … hasWorldRank hasRector hasTitle hasLocation :#Aino a HUMAN Each cell is an RDF triple RDF triples (continue) … … … !
  • 79. Traditional RDF Statement • Subject of an RDF statement is a resource • Predicate of an RDF statement is a property of a resource • Object of an RDF statement is the value of a property of a resource (either literal or resource) Property_k Resource_i Literal Resource_i Property_r Resource_ j OR
  • 80. New semantics of RDF Statement in S-APL (object - executable resource) Resource_i Property_m exe: Resource_ j Semantics of such statement executable property means that the value of the Property_m of the Resource_i can be obtained as a result of execution of the procedure (query, service, function, etc.) represented as Resource_ j SS--AAPPLL Semantic Agent Programming Language (Designed by Industrial Ontologies Group)
  • 82. RDFa: Combining human- and machine-readable information within the same document ! RDFa (or Resource Description Framework – in – attributes) is a W3C Recommendation that adds a set of attribute-level extensions to XHTML for embedding rich metadata within Web documents. RDFa provides a set of XHTML attributes to augment visual data with machine-readable hints and turns the existing human-visible text and links into machine-readable data without repeating content. The great thing about RDFa is the ability to weave meaning and rich data directly into a web page without having any impact on the front-end user experience. XHTML HTML5 Today's web is built predominantly for human readers. Even as machine-readable data begins to permeate the web, it is typically distributed in a separate file, with a separate format, and very limited correspondence between the human and machine versions. As a result, web browsers can provide only minimal assistance to humans in parsing and processing web pages: browsers only see presentation information. RDFa is intended to solve the problem of marking up machine-readable data in HTML documents. RDFa provides a set of HTML attributes to augment visual data with machine-readable hints. Using RDFa, authors may turn their existing human-visible text and links into machine-readable data without repeating content.
  • 83.
  • 84. Example of HTML : RDFa Example (1) Browser screenshot:
  • 85. RDFa Example (2) http://www.w3.org/TR/xhtml-rdfa-primer/ Read first: Use: (http://rdfa.info/play/) Update your HTML with some RDFa inside and check it:
  • 86. RDFa Example (3) HTML marked up with RDFa :
  • 88. 96 Where to look next • RDF: http://www.w3.org/RDF/ • RDF Schema: http://www.w3.org/TR/rdf-schema/ • RDFa : http://www.w3.org/TR/xhtml-rdfa-primer/
  • 89. DBpedia http://dbpedia.org/ DBpedia (DataBasePedia) is a project aiming to extract structured content from the information created as part of the Wikipedia project and making it available in the Web. DBpedia allows querying relationships and properties associated with Wikipedia resources, including links to other related datasets. Therefore DBpedia is one of the more famous parts of the decentralized Linked Data effort. The DBpedia data set uses a large multi-domain ontology which has been derived from Wikipedia. The English version of the DBpedia 2014 data set currently describes 4.58 million “things” with 583 million “facts”. In addition, localized versions of DBpedia available in 125 languages. All these versions together describe 38.3 million things, out of which 23.8 million overlap (interlinked) with concepts from the English DBpedia.
  • 90. Concepts in DBpedia DBpedia Ontology (2014) The DBpedia Ontology is a shallow, cross-domain ontology, which has been manually created based on the most commonly used infoboxes within Wikipedia. The ontology currently covers 685 classes which form a subsumption hierarchy and are described by 2,795 different properties.
  • 91. Naming “things” in DBpedia http://wiki.dbpedia.org/Datasets Each thing in the DBpedia data set is denoted by a de-referenceable URI-based reference of the form: http://dbpedia.org/resource/Name , where Name is derived from the URL of the source Wikipedia article, which has the form: http://en.wikipedia.org/wiki/Name . Thus, each DBpedia entity is tied directly to a Wikipedia article. Every DBpedia entity name resolves to a description-oriented Web document (or Web resource). Read more in: http://wiki.dbpedia.org/Datasets Kharkiv city in Wikipedia and DBpedia http://dbpedia.org/resource/Kharkiv http://en.wikipedia.org/wiki/Kharki v
  • 92. Building personal graph as Linked Data @base <http://www.cs.jyu.fi/ai/vagan/ontologies/university.owl#> . @prefix db: <http://dbpedia.org/resource/> . @prefix gs: <http://scholar.google.com/citations?user=> . db:Kharkiv_National_University_of_Radioelectronics db:Kharkiv db:Ukraine db:Finland :hasPhDFrom :hasPlaceOf Birth db:University_of_Jyvaskyla :isCitizenOf :isResidentOf :isEmployedBy :hasPublicationRecord : VaganTerziyan gs:4U8ydfgAAAAJ
  • 93. OWL: Web Ontology Language • The Web Ontology Language (OWL) is a family of knowledge representation languages or ontology languages for engineering ontologies or knowledge bases. The languages are characterized by formal semantics and RDF/XML-based serializations for the Semantic Web. • OWL DL (Description Logic) designed to provide the maximum expressiveness possible while retaining computational completeness (either φ or ¬φ belong), decidability (there is an effective procedure to determine whether φ is derivable or not), and the availability of practical reasoning algorithms. OWL DL includes all OWL language constructs, but they can be used only under certain restrictions http://www.w3.org/TR/owl-ref/ OWL 2004 http://www.w3.org/TR/owl2-overview/ OWL-2 2009
  • 94. Why OWL? Limitations of RDFS • RDFS is too weak in describing resources with sufficient details, e.g.: – No localised range and domain constraints • Cannot say that the range of isToughtBy is only professor when applied to professors and lecturer when applied to lecturers – No cardinality constraints • Cannot say that a course is taught by at least one professor, or persons have exactly 2 parents – No transitive, inverse or symmetrical properties • Cannot say that isPartOf is a transitive property, that hasSupervisor is the inverse of isSupervisorOf, and, that friendOf is symmetrical – Disjoint classes • Cannot say that Graduate and PhD. Students are two disjoint classes – Boolean combinations of classes • Sometimes we may need to build new classes by combining other classes using union, intersection, and complement (e.g. person is the disjoint union of the classes male and female)
  • 95. OWL Class and OWL Properties rdfs:Resource rdfs:Class rdf:Property owl:Class owl:ObjectProperty owl:DatatypeProperty
  • 96.
  • 97. OWL on one Slide • Symmetric: if P(x, y) then P(y, x) • Transitive: if P(x,y) and P(y,z) then P(x, z) • Functional: if P(x,y) and P(x,z) then y=z • InverseOf: if P1(x,y) then P2(y,x) • InverseFunctional: if P(y,x) and P(z,x) then y=z • allValuesFrom: P(x,y) and y=allValuesFrom(C) • someValuesFrom: P(x,y) and y=someValuesFrom(C) • hasValue: P(x,y) and y=hasValue(v) • cardinality: cardinality(P) = N • minCardinality: minCardinality(P) = N • maxCardinality: maxCardinality(P) = N • equivalentProperty: P1 = P2 • intersectionOf: C = intersectionOf(C1, C2, …) • unionOf: C = unionOf(C1, C2, …) • complementOf: C = complementOf(C1) • oneOf: C = one of(v1, v2, …) • equivalentClass: C1 = C2 • disjointWith: C1 != C2 • sameIndividualAs: I1 = I2 • differentFrom: I1 != I2 • AllDifferent: I1 != I2, I1 != I3, I2 != I3, … • Thing: I1, I2, … Legend: Properties are indicated by: P, P1, P2, etc Specific classes are indicated by: x, y, z Generic classes are indicated by: C, C1, C2 Values are indicated by: v, v1, v2 Instance documents are indicated by: I1, I2, I3, etc. A number is indicated by: N P(x,y) is read as: “property P relates x to y”
  • 98. An Example • Woman ≡ Person ⊓ Female • Man ≡ Person ⊓ ØWoman • Mother ≡ Woman ⊓ $hasChild.Person • Father ≡ Man ⊓ $hasChild.Person • Parent ≡ Father ⊔ Mother • Grandmother ≡ Mother ⊓ $hasChild.Parent We can further infer (though not explicitly stated):  Grandmother ⊑ Person Grandmother ⊑ Man ⊔ Woman etc.
  • 99. OWL-2 vs. OWL OWL-2 adds new functionality with respect to OWL.: • keys; • disjoint union of classes • property chains; • richer datatypes, data ranges; • qualified cardinality restrictions; • asymmetric, reflexive, and disjoint properties; • enhanced annotation capabilities .
  • 100. Resources • W3C Documents – Guide: http://www.w3.org/TR/owl-guide/ – Reference: http://www.w3.org/TR/owl-ref/ – Semantics and Abstract Syntax: http://www.w3.org/TR/owl-semantics/ • OWL Tutorials – Ian Horrocks, Sean Bechhofer: http://www.cs.man.ac.uk/~horrocks/Slides/Innsbruck-tutorial/ – Roger L. Costello, David B. Jacobs: http://www.xfront.com/owl/ • Example Ontologies, e.g. here: http://www.daml.org/ontologies/
  • 101. Tutorial: Designing Ontologies with Protégé • Protégé is an ontology editor and a knowledge-base editor (download from: http://protege.stanford.edu ). • Protégé is also an open-source, Java tool that provides an extensible architecture for the creation of customized knowledge-based applications. • Protégé's OWL Plug-in now provides support for editing Semantic Web ontologies. http://www.cs.jyu.fi/ai/vagan/ProtegeOWL_1.ppt http://www.cs.jyu.fi/ai/vagan/ProtegeOWL_2.ppt PLEASE !!! Download version: Protégé 3.5. http://www.cs.jyu.fi/ai/vagan/Ontologies.ppt
  • 102. Download Protégé 3.5 http://protege.stanford.edu/
  • 103.
  • 104. Restrictions of Monotonic Logic Semantic Web / Ontologies / OWL are based on the Open World Assumption: “everything is allowed if not explicitly prohibited” Databases / SQL / Prologue are based on the Closed World Assumption: “everything is prohibited if not explicitly allowed” Example: John loves Mary Q: John loves Mary? A: yes Q: Mary loves John? A: I do not know … Example: John loves Mary Q: John loves Mary? A: yes Q: Mary loves John? A: no Non-Monotonic Logic driven by the “negation as failure” rule is used for reasoning. For example “belief revision” can be applied as the process of changing beliefs to accommodate a new belief that might be inconsistent with the old ones. In the assumption that the new belief is correct, some of the old ones have to be retracted in order to maintain consistency. Monotonic Logic assumes that adding a formula to a theory never produces a reduction of its set of consequences, i.e., learning a new piece of knowledge cannot reduce the set of what is known. Therefore monotonic logic cannot handle various reasoning tasks such as: reasoning by default (consequences may be derived only because of lack of evidence of the contrary); abductive reasoning (consequences are only deduced as most likely explanations); belief revision (when new knowledge may contradict old beliefs), etc.
  • 105.
  • 106. Example (formalised rules) Atomic predicates from the story: Let the initial state to be: R1: IF (P1ÙP4 ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2 ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. 1. Mary will love John if he loves her and if he is not abusing Pete. 2. Pete will consider Mary as his friend if she is not in love with John. 3. Pete will not consider Mary as his friend if she is in love with John who is abusing him. 4. John will stop loving Mary if she does not love him or she is a friend of Pete. 5. Mary will stop loving John if he is abusing Pete. 6. John being in bad mood will abuse Pete. 7. John gets rid of bad mood if Mary loves him or if she is not a friend of Pete. 8. John will fall in a bad mood if he loves Mary and she does not love him or vice versa. 9. John will stop abusing Pete if he (John) does not love Mary any more or if she is not a friend of Pete. P1 = :John:loves :Mary . P2 = :Mary :loves :John . P3 = :Pete :hasFriend :Mary . P4 = :John :isAbusing :Pete . P5 = :John :hasBadMood ”true”. S(t0 ) =P1 Ù P2 ÙP3 Ù P4 Ù P5 Formalized rules from the story: Rules as the story:
  • 107. Hereinafter for the simplicity we will apply the rules synchronously ! Example (reasoning, 1-st step) loves John Mary Pete hasFriend S(t0 ) =P1 Ù P2 ÙP3 Ù P4 Ù P5 R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; 0 1 2 3 4 5 R9: IF ((P1ÚP3)ÙP4) THEN P4. S(t +t ) = P ÙP ÙP Ù P ÙP
  • 108. Example (reasoning, 2-nd step) loves John Mary Pete hasFriend R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. hasBadMood S(t0 +t ) = P1 ÙP2 ÙP3 Ù P4 ÙP5 S(t0 + 2×t ) = P1 ÙP2 ÙP3 ÙP4 Ù P5
  • 109. Example (reasoning, 3-rd step) loves John Mary Pete hasFriend R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. isAbusing S(t0 + 2×t ) = P1 ÙP2 ÙP3 ÙP4 Ù P5 S(t0 + 3×t ) = P1 Ù P2 Ù P3 Ù P4 ÙP5
  • 110. Example (reasoning, 4-th step) John Mary Pete R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. hasBadMood S(t0 + 3×t ) = P1 Ù P2 Ù P3 Ù P4 ÙP5 S(t0 + 4×t ) = P1 Ù P2 ÙP3 ÙP4 Ù P5
  • 111. Example (reasoning, 5-th step) John Mary isAbusing hasFriend Pete R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. S(t0 + 4×t ) = P1 Ù P2 ÙP3 ÙP4 Ù P5 S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5
  • 112. Example (reasoning, reaching terminal state) John Mary Pete R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5 hasFriend terminal state
  • 113. Example (final “terminal” state) 1. John does not love Mary. 2. Mary does not love John. 3. Mary is a friend of Pete. 4. John is not abusing Pete. 5. John is not in a bad mood. S(t0 + 5×t ) = P1 Ù P2 ÙP3 Ù P4 Ù P5
  • 114. Example (another initial and in the same time terminal state) 1. John loves Mary. 2. Mary loves John. 3. Mary is not a friend of Pete. 4. John is not abusing Pete. 5. John is not in a bad mood. to love John Mary S(t0 ) =P1 ÙP2 Ù P3 Ù P4 Ù P5 to love Pete R1: IF (P1ÙP4ÙP2) THEN P 2; R2: IF (P2ÙP3) THEN P 3; R3: IF (P2ÙP4ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. terminal state
  • 115. Example (two possible terminal states of the “love triangle”) to love John Mary to love Pete John Mary Pete to have a friend
  • 116. Example (asynchronous reasoning tree) P1 Ù P2 ÙP3 Ù P4 Ù P5 R1: IF (P1ÙP4 ÙP2) THEN P 2; R2: IF (P2 ÙP3) THEN P 3; R3: IF (P2 ÙP4 ÙP3) THEN P3; R4: IF ((P3ÚP2)ÙP1) THEN P1; R5: IF (P2 ÙP4) THEN P2; R6: IF (P5 ÙP4) THEN P 4; R7: IF ((P2ÚP3)ÙP5) THEN P5; R8: IF ((P1ÙP2ÚP1ÙP2)ÙP5) THEN P 5; R9: IF ((P1ÚP3)ÙP4) THEN P4. P1 ÙP2 ÙP3 Ù P4 Ù P5 R1 R4 R8 P1 Ù P2 ÙP3 Ù P4 Ù P5 P1 Ù P2 ÙP3 Ù P4 ÙP5 R4 P1 ÙP2 ÙP3 Ù P4 Ù P5 R1 P1 ÙP2 ÙP3 Ù P4 ÙP5 R6 R4 P1 Ù P2 ÙP3 Ù P4 ÙP5 P1 Ù P2 ÙP3 ÙP4 ÙP5 R8 R4 R6 P1 ÙP2 ÙP3 Ù P4 ÙP5 P1 Ù P2 ÙP3 ÙP4 ÙP5 R4 R6 P1 ÙP2 ÙP3 ÙP4 ÙP5 R P1 ÙP2 Ù P3 ÙP4 ÙP5 9 P1 ÙP2 ÙP3 ÙP4 Ù P5 R5 R3 R7 R5 R9 R7 R3 R8 P1 Ù P2 Ù P3 ÙP4 ÙP5 P1 ÙP2 Ù P3 Ù P4 ÙP5 P1 ÙP2 Ù P3 ÙP4 Ù P5 R5 P1 Ù P2 ÙP3 ÙP4 Ù P5 R8 R9 R2 R7 R6 RR 7 5 P1 Ù P2 Ù P3 ÙP4 Ù P5 P1 Ù P2 Ù P3 Ù P4 ÙP5 R9 R9 P1 ÙP2 Ù P3 Ù P4 Ù P5 R9 R9 R2 R2 P1 Ù P2 Ù P3 Ù P4 Ù P5 R6 R7 R9 R2 R8
  • 119. SWRL Rule structure Contains an antecedent part (body), and a consequent (head). The body and head consist of positive conjunctions of atoms: Atom Ù Atom … → Atom Ù Atom … SWRL provides seven types of atoms: - Class Atoms owl:Class e.g., Person (?x), …, Person (John) - Individual Property atoms owl:ObjectProperty e.g., loves (?x, ?y), …, loves (John, Mary) - Data Valued Property atoms owl:DatatypeProperty e.g., hasAge(?x, 19), …, hasAge(Mary, 19) - Different Individuals atoms e.g., differentFrom(?x, ?y), …, - Same Individual atoms e.g., sameAs(?x, ?y), …, sameAs(John, ?y) - Built-in atoms (next slide) Person(?x) Ù hasSibling(?x,?y) Ù Man(?y) → hasBrother(?x,?y) antecedent consequent
  • 120. SWRL built-ins Some mathematical operations Comparison of two datatypes swrlb:add (satisfied iff the first argument is equal to swrlb:equal swrlb:notEqual swrlb:lessThan swrlb:lessThanOrEqual swrlb:greaterThan swrlb:greaterThanOrEqual swrlb:stringEqualIgnoreCase (satisfied iff the first argument (string) is the same as the second argument (upper/lower case ignored)) the arithmetic sum of the second argument and the third argument) swrlb:subtract swrlb:multiply swrlb:divide swrlb:pow (satisfied iff the first argument is equal to the result of the second argument raised to the third argument power) swrlb:abs (satisfied iff the first argument is the absolute value of the second argument) swrlb:round (satisfied iff the first argument is equal to the nearest number to the second argument with no fractional part) swrlb:booleanNot (satisfied iff the first argument is true and the second argument is false, or vice versa. Read more in: http://www.w3.org/Submission/SWRL/
  • 121. Examples of SWRL Rules (1) Rule computes age of a person from the current year and the date of birth: Person(?x) Ù hasYearOfBirth(?x, ?yborn) Ù hasCurrentYear(?x,?ycurrent) Ù Ù swrlb:subtract(?age, ?ycurrent, ?yborn) ® ® hasAgeYears(?x,?age)
  • 122. Examples of SWRL Rules A researcher, which Hirsch-index (citation index) is more than amount of years in her academic career, is a good researcher: Researcher(?x) Ù hasHindexOfPublications(?x, ?hirschindex) Ù Ù hasYearsInCareer(?x, ?years) Ù swrlb:greaterThan(?hirschindex,?years) ® ® GoodResearcher(?x)
  • 123. Examples of SWRL Rules A person of age between 29-55 would have an extra weight equal to positive difference between his/her weight in kilos and his/her height in centimeters (minus 100): Person(?x) Ù hasAgeYears(?x,?age) Ù swrlb:greaterThan(?age, 28) Ù Ù swrlb:lessThan(?age, 56) Ù hasWeightKg(?x, ?weight) Ù hasLengthSm(?x, ?length) Ù Ù swrlb:subtract(?ideal, ?length, 100) Ù swrlb:subtract(?extra, ?weight, ?ideal) Ù Ù swrlb:greaterThan(?extra, 0) ® ® hasExtraWeightKg(?x, ?extra)
  • 124. Examples of SWRL Rules A person of age between 29-55 would have a lacking weight equal to positive difference between his/her height in centimeters (minus 100) and his/her weight in kilos: Person(?x) Ù hasAgeYears(?x,?age) Ù swrlb:greaterThan(?age, 28) Ù Ù swrlb:lessThan(?age, 56) Ù hasWeightKg(?x, ?weight) Ù hasLengthSm(?x, ?length) Ù Ù swrlb:subtract(?ideal, ?length, 100) Ù swrlb:subtract(?lacking, ?ideal, ?weight) Ù Ù swrlb:greaterThan(?lacking, 0) ® ® hasLackingWeightKg(?x, ?lacking)

Notes de l'éditeur

  1. ¥begin{array}{r@{¥,}c@{¥,}l} ¥forall x.[¥textsf{¥color{blue} Heart}(x) &amp; {¥color{red}¥rightarrow} &amp; ¥textsf{¥color{blue} MuscularOrgan}(x) ¥,¥wedge¥, ¥¥ &amp; &amp; ¥exists y.[¥textsf{¥color{magenta} isPartOf}(x,y) ¥,¥wedge¥, ¥¥&amp;&amp;¥textsf{¥color{blue} CirculatorySystem}(y)]] ¥end{array}
  2. &amp;lt;owl:ObjectProperty rdf:ID=&amp;quot;producesWine&amp;quot;&amp;gt; &amp;lt;owl:inverseOf rdf:resource=&amp;quot;#hasMaker&amp;quot; /&amp;gt; &amp;lt;/owl:ObjectProperty&amp;gt;