View
214
Download
0
Tags:
Embed Size (px)
Citation preview
Semantic Web:Semantic Web:State of the Art and OpportunitiesState of the Art and Opportunities
Vagan TerziyanCompiled, partly based on various online tutorials
and presentations, with respect to their authors
“Industrial Ontologies” Group
http://www.cs.jyu.fi/ai/OntoGroup/index.html
University of Jyväskylä
Industrial Ontologies GroupIndustrial Ontologies Group
4
Web Limitations
Doubles in sizeevery six months
Average WWW searches examineonly about 25% of potentially
relevant sites and return a lot ofunwanted information
Information on web is not suitablefor software agents
World Wide Web
Semantic Web
The Semantic Web is avision: the idea of havingdata on the Web defined andlinked in a way that it can beused by machines not just fordisplay purposes, but forautomation, integration andreuse of data across variousapplications.
7
B e f o r e S e m a n t i c W e b
W e b c o n t e n t
U s e r sC r e a t o r sW W Wa n dB e y o n d
8
S e m a n tic W e b S tru c tu re
S e m a n ticA n n o ta tio n s
O n to lo g ie s L o g ic a l S u p p o rt
L a n g u a g e s T o o ls A p p lic a tio n s /S e rv ic e s
W e b c o n te n t
U se rsC re a to rsW W Wa n dB e y o n d
S e m a n ticW e b
Motivation for Semantic Web Motivation for Semantic Web
Limitations of the Web today
Machine-to-human, not machine-to-machine
Summarizing the Problem: Computers don’t understand Meaning
• “My mouse is broken. I need a new one…”
Use of ontology
“My mouse is broken” vs. “My mouse is dead”
Approach: Semantic WebApproach: Semantic Web
“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)
Semantic Web: New “Users” Semantic Web: New “Users”
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
Creators
applications
agents
Semantic Web: Annotations
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
SemanticAnnotations
Ontologies Logical Support
Languages Tools Applications /Services
Web content
UsersCreatorsWWWandBeyond
SemanticWeb
Semantic Webcontent
UsersSemanticWeb andBeyond
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
Where we are Today: the Syntactic Web
[Hendler & Miller 02]
Most of the Current Web (dumb links) Most of the Current Web (dumb links)
Semantic WebSemantic Web(data connected by relationships)(data connected by relationships)
Mary
Director
Secretary
to_be_in_love_with
has_job
has_job
John
has_homepage
has_homepage
OntologyOntology
RDF – Semantic Web over Web Resources
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.
Semantic Predicate
otherwise 0,
; Aobject withL named relation
by connected is Aobject if 1,
=)A,L,P(A jk
i
jki
AiAj
Lk
Ai
Lk
Relation (i j)
Property (i = j)
46
Semantic Function
)A,(AL jik
AiAj
Lk
Ai
Lk
Relation
Property
C),(AL ik
Name of Function Variables
Value of property
47
Different Ways to Represent properties
RED Tomato has_color
Tomato
has_red_color
Tomato
instance_of
Red Thing
C
in RDF
in RDFSin semantic network
48
RDF StatementRDF Statement
Resource_i Value_nProperty_k
Resource_iProperty_r
Resource_ j
OR
49
Semantic Relation as RDF statement(so called “object property”)
Ai Aj
Lk
Relation (i j)
http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.htmlPersonal web page of Terziyan V. Web page of Agora Center
refers_to
ResourceRelation
Resource
Subject objectPredicate
http://www.cs.jyu.fi/ai/vagan/#vaganURI of Terziyan V. employed_by
Dereferenceable URI (“Hash vs. Slash”)
URI of Agora Center http://www.jyu.fi/agora-center/#AC
Dereferenceable URI (“Hash vs. Slash”)
50
Semantic Property as RDF statement (so called “datatype property”)
http://www.cs.jyu.fi/ai/vagan/index.htmlPersonal web page of Terziyan V.
Literal
has_birthday
ResourceProperty
Subject objectPredicate
LiteralAi
LkProperty (i = j)
15.02.2000
http://www.cs.jyu.fi/ai/vagan/#vaganURI of Terziyan V. has_birthday
27.12.1958Dereferenceable URI (“Hash vs. Slash”)
“Birthday” of the web-page
Birthday of Terziyan V.
51
Semantic Network of Web Resources
http://www.cs.jyu.fi/ai/vagan/index.html http://www.jyu.fi/agora-center/indexEng.htmlPersonal web page of Terziyan V. Web page of Agora Center
refers_to
http://www.cs.jyu.fi/ai/vagan/#vaganURI of Terziyan V. employed_by URI of Agora Center
http://www.jyu.fi/agora-center/#AC
hasWebPage
isWebPageOf
hasWebPage
isWebPageOf27.12.1958
has_birthday
52
From Hyperlinks to Semantic Web
http://www.cs.jyu.fi/ai/ university
http://www.kture.kharkov.ua/
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
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.
http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html
Dereferenceable URIDereferenceable URIThe 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.
• 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
RDF Statement
Example of RDF Statement
Subject (resource) http://www.w3.org/Home/Lassila
Predicate (property) Creator
Object (literal) “Ora Lassila”
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
RDF Example (subject of statement)
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
<rdf:RDF> <rdf:Description about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>
Subject
RDF Example (predicate of statement)
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
<rdf:RDF> <rdf:Description about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>
Predicate
RDF Example (object of statement)
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
<rdf:RDF> <rdf:Description about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>
Object
RDF Example (reference to ontology)
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
<rdf:RDF> <rdf:Description 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 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 about= "http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>
Namespaces as attributes of “RDF” element in XML
RDF Abbreviated Syntax
• While the serialisation syntax shows the structure of an RDF model most clearly, often it is desirable to use a more compact XML form.
• The RDF abbreviated syntax accomplishes this.
Abbreviated Syntax Example (1)
<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" /></rdf:RDF>
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
Abbreviated Syntax Example (2)
<rdf:Description about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" />
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila. Subject
Abbreviated Syntax Example (3)
<rdf:Description about="http://www.w3.org/Home/Lassila" s:Creator ="Ora Lassila" />
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
Predicate
Abbreviated Syntax Example (4)
<rdf:Description about="http://www.w3.org/Home/Lassila" s:Creator="Ora Lassila" />
Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
Object
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
RDF N3 examples
• Simple statement :John :Loves :Mary
• Reified statement{:John :Loves :Mary} :accordingTo :Bill
• Goal statement:gb:I gb:want {:John :Loves :Mary}
The prefix gb: is used here to denote the ontology of S-APL.
Some N3 syntax specifics
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
:Professor a rdfs:Class
<http://www.cs.jyu.fi/ai/vagan> a :Professor
Ontological statements in N3
Statements about Statements (1)
An unnamed node is the source of all five arcs. The first arc is labelled rdf:type and points to the node identified as rdf:Statement. The second arc is labelled rdf:predicateand points to the node identified as s:Creator. The third arc is labelled rdf:subject and points to a node labelled http://www.w3.org/Home/Lassila. The fourth arc is labelled rdf:object and points to a node containing the string value "Ora Lassila". The fifth and final arc is labelled a:attributedTo and points to a node containing the string value "Ralph Swick".
“Ralph Swick says that Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila”
Statements about Statements (2)
“Ralph Swick says that Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila”
<rdf:RDF xmlns:rdf="http://w3.org/TR/1999/PR-rdf-syntax-19990105#" xmlns:a="http://description.org/schema/"> <rdf:Description> <rdf:subject resource="http://www.w3.org/Home/Lassila" /> <rdf:predicate resource="http://description.org/schema#Creator" /> <rdf:object>Ora Lassila</rdf:object> <rdf:type resource="http://w3.org/TR/1999/PR-rdf-syntax- 19990105#Statement" /> <a:attributedTo>Ralph Swick</a:attributedTo> </rdf:Description> </rdf:RDF>
What is RDFS ?
• RDF Schema – Defines vocabulary for RDF– Organizes this vocabulary in a typed hierarchy
(Class, subClassOf, type, Property, subPropertyOf)• Rich, web-based publication format for declaring
semantics (XML for exchange)• Capability to explicitly declare semantic relations
between vocabulary terms
RDF Schema
• Semantic network on the Web
• Nodes are identified by URIs
• rdfs:Class
• rdfs:Property
• rdfs:subClassOf
106
Dublin Core
• A set of fifteen basic properties for describing generalised Web resources
• ISO Standard 15836-2003 (February 2003): http://www.niso.org/international/SC4/n515.pdf
http://dublincore.org/
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.
107
Dublin Core (15 basic properties):
• Title
• Creator
• Subject
• Description
• Publisher
• Contributor
• Date
• Type
• Format
• Identifier
• Source
• Language
• Relation
• Coverage
• Rights
109
Where to look next
• RDF:http://www.w3.org/RDF/
• RDF Schema:http://www.w3.org/TR/rdf-schema/
Traditional RDF StatementTraditional RDF Statement
Resource_i LiteralProperty_k
Resource_iProperty_r
Resource_ j
OR
• 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)
New semantics of RDF Statement in S-APL (object - executable resource)New semantics of RDF Statement in S-APL (object - executable resource)
Resource_iProperty_m exe: Resource_
j
executable resourceSemantics of such statement 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
S-APLS-APLSemantic Agent Programming Language
(Designed by Industrial Ontologies Group)
Ontological Vision of Semantic Web
Semantic Web needs ontologies
An ontology is document or file that formally and in a
standardized way defines the hierarchy of classes within the domain, semantic relations among terms and inference rules
Use of ontologies: Sharing semantics of your data across
distributed applications
Communication between people
Studer(98): Formal, explicit specification of a shared conceptualization
Machine readable
Concepts, properties,functions, axiomsare explicitly defined
Consensualknowledge
Abstract model of some phenomenain the world
What is an ontology?
121
What is an Ontology?From: Ian Horrocks “OWL 2: The Next Generation”
122
What is an Ontology?A model of (some aspect of) the world
From: Ian Horrocks “OWL 2: The Next Generation”
123
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”
124
What is an Ontology?A model of (some aspect of) the world
• Introduces vocabulary relevant to domain, e.g.:
– Anatomy
– Cellular biology
From: Ian Horrocks “OWL 2: The Next Generation”
125
What is an Ontology?A model of (some aspect of) the world
• Introduces vocabulary relevant to domain, e.g.:
– Anatomy
– Cellular biology
– Aerospace
From: Ian Horrocks “OWL 2: The Next Generation”
126
What is an Ontology?A model of (some aspect of) the world
• Introduces vocabulary relevant to domain, e.g.:
– Anatomy
– Cellular biology
– Aerospace
– Dogs
From: Ian Horrocks “OWL 2: The Next Generation”
127
What is an Ontology?A model of (some aspect of) the world
• Introduces vocabulary relevant to domain, e.g.:
– Anatomy
– Cellular biology
– Aerospace
– Dogs
– Hotdogs
– …
From: Ian Horrocks “OWL 2: The Next Generation”
128
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 thatis part of the circulatory system
From: Ian Horrocks “OWL 2: The Next Generation”
129
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 thatis part of the circulatory system
• Formalised using suitable logic
From: Ian Horrocks “OWL 2: The Next Generation”
130
DL SemanticsSemantics given by standard FO model theory:
Interpretation domain IInterpretation function I
Individuals iI 2 I
John
Mary
Concepts CI µ I
Lawyer
Doctor
Vehicle
Roles rI µ I £ I
hasChild
owns
(Lawyer u Doctor)
From: Ian Horrocks “OWL: A Description Logic Based Ontology Language”
Ontology Elements
•Concepts(classes) + their hierarchy
•Concept properties (slots/attributes)
•Property restrictions (type, cardinality, domain)
•Relations between concepts (disjoint, equality)
•Instances
How to build an ontology?
Steps:
•determine domain and scope
•enumerate important terms
•define classes and class hierarchies
•define slots
•define slot restrictions (cardinality, value-type)
Step 1: Determine Domain and Scope
Domain: geography
Application: route planning agent
Possible questions: Distance between two cities?
What sort of connections exist between two cities?In which country is a city?How many borders are crossed?
Step 2: Enumerate Important Terms
country
city capital
border
connection
Connection_on_land
Connection_in_air
Connection_on_water
road
railway
currency
Step 3: Define Classes and Class Hierarchy
Step 4: Define Slots of Classes
Step 5: Define slot constraints
•Slot-cardinalityEx: Borders_with multiple, Start_point single
•Slot-value typeEx: Borders_with- Country
Geographic_entity
Country CityHas_capital
Capital_ofBorders_with
ConnectionStart_point
End_point
Capital_city
OWL became standard
• 10 February 2004 the World Wide Web Consortium announced final approval of two key Semantic Web technologies, the revised Resource Description Framework (RDF) and the Web Ontology Language (OWL).
• Read more in:
http://www.w3.org/2004/01/sws-pressrelease.html.en
• What is OWL? – OWL is a language for defining Web
Ontologies and their associated Knowledge Bases
– The OWL language is a revision of the DAML+OIL web ontology language incorporating learning from the design and application use of DAML+OIL.
OWL IntroductionOWL Introduction
Example
• There are two types of animals, Male and Female.
<rdfs:Class rdf:ID="Male"> <rdfs:subClassOf rdf:resource="#Animal"/></rdfs:Class>
• The subClassOf element asserts that its subject - Male - is a subclass of its object -- the resource identified by #Animal.
<rdfs:Class rdf:ID="Female"> <rdfs:subClassOf rdf:resource="#Animal"/> <owl:disjointWith rdf:resource="#Male"/></rdfs:Class>
• Some animals are Female, too, but nothing can be both Male and Female (in this ontology) because these two classes are disjoint (using the disjointWith tag).
OWL Example in Protégé (1)
• Class– Person superclass– Man, Woman subclasses
• Properties– isWifeOf, isHusbandOf
• Property characteristics, restrictions– inverseOf– domain– range– Cardinality
• Class expressions– disjointWith
OWL Example in Protégé (2)
OWL Example in Protégé (3)
• 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, …
OWL on one Slide
Legend:Properties are indicated by: P, P1, P2, etcSpecific classes are indicated by: x, y, zGeneric classes are indicated by: C, C1, C2Values are indicated by: v, v1, v2Instance documents are indicated by: I1, I2, I3, etc.A number is indicated by: NP(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.
• 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/
Resources
Tutorial: Designing Ontologies with Protégé
http://www.cs.man.ac.uk/~horrocks/Teaching/cs646/
http://www.co-ode.org/resources/tutorials/ProtegeOWLTutorial.pdf
• 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.
PLEASE !!!Download version:Protégé 3.4.4.
http://www.cs.jyu.fi/ai/vagan/Ontologies.ppt
Web of Trust
• Claims can be verified if there is supporting evidence from another (trusted) source– We only believe that someone is a professor at a
university if the university also claims that person is a professor, and the university is on a list I trust.
believe(c1) :- claims(x, c1) ^ predicate(c1, professorAt) ^ arg1(c1, x) ^ arg2(c1, y) ^ claims(c2, y) ^ predicate(c2, professorAt) ^ arg1(c2, x) ^ arg2(c2, y) ^ AccreditedUniversity(y)
AcknowledgedUniversity(u) :- link-from(“http://www.cs.umd.edu/university-list”,u)
Notice this one
Rules on top of Semantic Web (“Metasemantics”)
Ì Å Ò À Ñ Å Ì À Í Ò È Ê À
Ïðîäóêöèîííûå
ïðàâèëà ïðàâèëàÂðåìåííûå
ïðàâèëàÑåìàíòè÷åñêèå
Ñåìàíòè÷åñêàÿ
ñåòü1
2
3
5
410
11 89
6
7
R T
S
P
M
Production Rules
Temporal Rules
Semantic Rules
Semantic Web
Metasemantics
State of a Semantic Net
)A,L,(AP)A,L,(AP=S(t) qnmt
0=)qA,nL,m(AtPqn,m,
jkit
1=)jA,kL,i(AtPkj,i,
)A,L,P(A)A,L,P(A=S(t) 221211 )A,L,P(A)A,L,P(A 342232
A1 A
A2
3
L1
L
L
L
2
3
4
P=P(A,L,A)1 11 2 P=P(A,L,A)2 12 2
P=P(A,L,A)3 2 3 2 P=P(A,L,A)4 2 4 3
4321 PPPP=S(t)
Production Rules
kii P THEN )IF(S :R
kjj P THEN )IF(S :R
iki SP=S
jkj SP=S
.P THEN ))PP(PP( IF :R 243121
A1 A
A2
3
L1
L
L
3
4
A1 A
A2
3
L1
L
L
L
2
3
4
,*)ii LP(*,=P
Production-Based Reasoning
Initial state
State after ntransformations
Set of Production Rules
S(t0) S(t0+n·τ)
Example (not formalised rules)
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.
Example (formalised rules)
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
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 = P(A1, L1, A2) - John loves Mary;
P2 = P(A2, L1, A1) - Mary loves John;
P3 = P(A3, L2, A2) - Pete has a friend Mary;
P4 = P(A1, L3, A3) - John is abusing Pete;
P5 = P(A1, L4, A1) - John has a bad mood.
Example (reasoning, 1-st step)
John Mary
Pete
to love
to have a friend
543210 PPPPP=)S(t
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .543210 PPPPP=)S(t
Example (reasoning, 2-nd step)
John Mary
Pete
to love
to have a friend
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
543210 PPPPP=)S(t
543210 PPPPP=)S(t 2
to have a bad mood
Example (reasoning, 3-rd step)
John Mary
Pete
to love
to have a friend
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
543210 PPPPP=)S(t 2
to abuse
543210 PPPPP=)S(t 3
Example (reasoning, 4-th step)
John Mary
PeteR : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
543210 PPPPP=)S(t 3
to have a bad mood
543210 PPPPP=)S(t 4
Example (reasoning, 5-th step)
John Mary
PeteR : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
543210 PPPPP=)S(t 4
543210 PPPPP=)S(t 5
to abuse to have a friend
Example (reasoning, reaching terminal state)
John Mary
PeteR : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
543210 PPPPP=)S(t 5
to have a friend
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.
543210 PPPPP=)5S(t
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.
543210 PPPPP=)S(t
John Mary
Pete
to love
to love
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
terminal state
Example (two possible terminal states of the “love triangle”)
John Mary
Pete
to love
to love
John Mary
Peteto have a friend
Example (asynchronous reasoning tree)
54321 PPPPP
R : IF ( P P P ) THEN P1 1 4 2 2 ;R : IF ( P P ) THEN P2 2 3 3 ;R : IF ( P P P ) THEN P3 2 4 3 3 ;R : IF ( ( P P ) P ) THEN P4 3 2 1 1 ;R : IF ( P P ) THEN P5 2 4 2 ;R : IF ( P P ) THEN P6 5 4 4 ;R : IF ( ( P P ) P ) THEN P7 2 3 5 5 ;R : IF ( ( P P P P ) P ) THEN P8 1 2 1 2 5 5 ;R : IF ( ( P P ) P ) THEN P9 1 3 4 4 .
54321 PPPPP 54321 PPPPP 54321 PPPPP
R1R4
R8
54321 PPPPP
R4
R1
54321 PPPPP
R6
54321 PPPPP 54321 PPPPP
R4
54321 PPPPP
R8R4 R6
54321 PPPPP
R4
54321 PPPPP
R6
54321 PPPPP R9
54321 PPPPP R5
R3
R7
54321 PPPPP 54321 PPPPP 54321 PPPPP
R5R9 R7
R3
54321 PPPPP
R5
R8R9
R2
54321 PPPPP
R7
54321 PPPPP R9
54321 PPPPP
R6 R7R5
R8
R9
R9
54321 PPPPP
R9 R2R2
R6
R7
R9
R2
R8
Temporal Rules
• Lifetime of a relation
• Restoration time of a relation
Lifetime of a Relation
T A A i j L k
Lifetime of relation Lk, which means
that since appearance in the network this relation is valid T units of time
Example (Initial state of the network)
1
4
2
4
3
A 2 L 2
L 3
L 4
L 5
L 1
L 6
A 1 A 3
t = t0
Example (Network evolution)
A 1 A 1
A 2 A 2
A 3 A 3
L 2 L 2
L 3
L 4 L 4
L 5 L 5
L 6 L 6
A 1 A 1
A 2 A 2
A 3
L 2
L
L 4 L 4
L 5
6
A 3
t = t0 + τ t = t0 + 2τ
t = t0 + 3τ t = t0 + 4τ
Restoration Time of a Relation
A i A j L k
T ~
Restoration (“relaxation”) time of
relation Lk, which means that since
removal from the network this relation will be restored and become valid again after T units of time
~
Example
2
A 2
L 3
L 4
L
L
A 1 A 3
1
2
1
3
2
Example (Network evolution)
A 1 A 1
A 2 A 2
A 3 A 3 L 4
A 1
A 2
L A 3
4
L 3
L 1
A 1
A 2
L A 3
4
L 3
L 1
L 2
t = t0 t = t0 + τ
t = t0 + 2τ t = t0 + 3τ
Semantic Pendulum (Cyclic)
A i A j T L k
T ~
Cyclic Pendulum Example
A 1 A 2 L 1 A 1 A 2
A 1 A 2 L 1 A 1 A 2
t = t0 t = t0 + 2τ
t = t0 + 5τ t = t0 + 7τ
A1 A22L1
3
Semantic Rules in SWRL
Metasemantic Algebra of Contexts
Ai
A j
Ai
A j
kL
~Lk
Semantic Operations: Inversion
),~
,(),,( ikjjki ALAPALAP
kk LL ~~
),,(),,( jkijki ALAPALAP
Semantic Operations: Negation
P(<Mary>, <to_love>, <Tom>) = false,
it is the same as:
P(<Mary>, <not_to_love>, <Tom>) = true.
kk LL kk LL~~
As
Aj
Lk
Ai
Ln As
Aj
Lk
Ai
Ln
L Lk n*
Semantic Operations: Composition
),*,(),,(),,( jnkijnsski ALLAPALAPALAP
If it is true: P(<Mary>, <has_husband>, <Tom>) and
P(<Tom>, <has_mother>, <Diana>),
then it is also true that:
P(<Mary>, <has_mother-in-law>, <Diana>).
Composition in Semantic Web
If it is true: P(<Mary>, <has_husband>, <Tom>) and
P(<Tom>, <has_mother>, <Diana>),
then it is also true that:
P(<Mary>, <has_mother-in-law>, <Diana>).
has_husband has_mother
has_mother-in-law
Aj Lk
Ai
Ln
AjAiL Lk n
Semantic Operations: Integration
),,(),,(),,( jnkijnijki ALLAPALAPALAP
<to_give_birth_to> + <to_take_care_of> = <to_be_mother_of>.
Al'
AjLkAi
Ln'
AjAiLkLn'a)
Semantic Operations: Interpretation
Al'
LkAi
Ln'
Ai
LkLn'
b)
),,(
)),,(,(),,(),,('
''''
jLki
jkillnljki
ALAP
ALAPAistALAPALAP
n
Interpretation in Semantic Web(RDF Reification)
has_polytical_opponent
has_coalition_partner
V. Yuschenko V. Yanukovich
Source: “Ukrayinska Pravda”
Source: “Obozrevatel”
agrees
agrees
level thn of metacont.about knowl....contextabout knowl.knowledge
knowledge dinterprete
Interpreting Knowledge in a Context (multiple reification)
…
Interpretation (Decontextualization)
Suppose that your colleague, whose context you know well, has described you a situation. You use knowledge about context of this person to interpret the “real” situation. Example is more complicated if several persons describe you the same situation. In this case, the context of the situation is the semantic sum over all personal contexts.
)knowledge dinterprete(knowledge received contextabout knowledgexL
Content Forecasting
Suppose that you observe some situation and know exactly what happened. Than you can guess by which way this situation will be described to you by other persons whose context you know well.
knowledge truecontextabout knowledgexL
Context Recognition
knowledge dinterpreteknowledge xL
Suppose that someone sends you a message describing the situation that you know well. You compare your own knowledge with the knowledge you received. Usually you can derive your opinion about the sender of this letter. Knowledge about the source of the message, you derived, can be considered as certain context in which real situation has been interpreted and this can help you to recognize a source or at least his motivation to change the reality.
tioninterpreta)(
alizationdecontextu)()(nL
mn
mm
Lk
Lx
Lkxk
Lx
LL
LLLL
Lifting (Relative Decontextualization)
This means deriving knowledge interpreted in some context if it is known how this knowledge was interpreted in another context.
Six Challenges for the Semantic Web
Richard Benjamins, Jesus Contreras,
Oscar Corcho, Asuncion Gomez-Perez
April 2002
• Currently, there is little Semantic Web content available. There is a need need to create a set of annotation services (middleware) concerning static and dynamic web documents, which may include multimedia, and web services.
Challenge 1: Availability of ContentChallenge 1: Availability of Content
• Constructing of kernel ontologies to be used by all the domains.
• Managing evolution of ontologies and their relation to already annotated data.
Challenge 2: Ontology Availability, Challenge 2: Ontology Availability, Development and EvolutionDevelopment and Evolution
• Once we have the Semantic Web content, we need to worry about how to manage it in a scalable manner, that is, how to organize it, where to store it and how to find the right content.
Challenge 3: Scalability of Semantic Challenge 3: Scalability of Semantic Web ContentWeb Content
• Multilinguality plays an increasing role at the level of ontologies, of annotations and of user interface.
Challenge 4: MultilingualityChallenge 4: Multilinguality
• With the increasing amount of information overload, intuitive visualization of content will become more and more important.
Challenge 5: VisualizationChallenge 5: Visualization
• WWW consortium is producing recommendations on the languages and technology that will be used in Semantic Web area.
• In order to advance the state of the art in the Semantic Web, it is important that such standards appear fast and will be adopted by the community.
Challenge 6: Semantic Web Challenge 6: Semantic Web Language StandardizationLanguage Standardization
Summary
• The semantic web is based on machine-processable semantics of data.
• Its backbone technology are Ontologies.
• It is based on new web languages such as XML, RDF, and OWL, and tools that make use of these languages.
ConclusionConclusion
• Semantic Web is not only a technologytechnology as many used to name it;
• Semantic Web is not only an environmentenvironment as many naming it now;
• Semantic WebSemantic Web it is a new contextcontext within which one should rethink and re-interpret his existing businesses, resources, services, technologies, processes, environments, products etc. to raise them to totally new level of performance…
“Ask not what the Semantic Web Can do for you, ask what you can do
for the Semantic Web”
Hans-Georg Stork, European Union
http://lsdis.cs.uga.edu/SemNSF