2011 L2 - Ontology-RF

sounderslipInternet and Web Development

Oct 22, 2013 (4 years and 18 days ago)

59 views



1

Lecture #2 Basic Concepts of Ontology




& OWL/SWRL

Ref:

Ch 2. Ontology


Definition & Overview

“Ontology Learning for the Semantic Web,” by Alexander Maedche

Kluwer Academic Publishers, 2002


OWL Guide
-

http://www.w3.org/TR/owl
-
guide

2011, 2. 15, 17



2

Contents


Ontology


Ontology Language


OWL/SWRL



3

Ontology


Ontology Definition


Ontology


Its Origin


Ontologies for Communication

Ref: Ch 2. Ontology


Definition & Overview, “Ontology Learning for the
Semantic Web,” by Alexander Maedche, Kluwer Academic Publishers, 2002



4

Ontology Definition


Term “Ontology”



has been introduced by Aristotle in Metaphysics



Ontology: Several disciplines



Ontology in Philosophy


Ontology in Computer Science

Metaphysics is a part of philosophy which is concerned with understanding reality
and developing theories about what exists and how we know that it exists



5

Ontology in
Philosophy


Ontology: Philosophical discipline



A branch of philosophy that deals with the
nature and the
organization of being



A particular
system of categories
accounting for a certain vision of
world.



Ontology is a term
borrowed from philosophy
that refers to the
science of describing
the kinds of entities in the world and how they
are related. [OWL Guide
-

http://www.w3.org/TR/owl
-
guide
]



Philosophers try to answer questions


“What being is?” and


“What are the features common to all being?”



6

Ontology in Computer Science


Ontology is An Engineering artifact



Constituted by a
specific vocabulary
used to describe a certain
reality,


+


A set of explicit assumptions
regarding the intended meaning of the
vocabulary.



Vocabulary appears as
unary and binary predicates
, called
concepts

and
relations
, respectively.



Usually a form of
first
-
order logic (FOL)

theory is used to represent
these assumptions.





7

Ontology in Computer Science


Needs for Ontologies in Computer Science



Humans use their
language (natural language: NL)
to communicate
and to create models of world.



Natural languages are
not suitable
for building models in computer
science, because they are
too ambiguous
.



Therefore,
Formal Language
are used to specify models of the
world.


Ex) Mathematics


Ex) Best known formal language


First
-
Order Logic (FOL)





8

Ontology in Computer Science


Needs for Ontologies in Computer Science



Formal Languages (FL : FOL)


Have strict mathematical definitions


Defined as a (possibly infinite) set of strings.


Each string is a concatenation of terminal symbols, sometimes
called words.



Natural Languages (NL : Korean)


Have no strict definition but are used by a community of speakers.



Grammar


A finite set of rules that specifies a language


FL have an
official grammar
, specified in manuals or books.


NL have
no official grammar
, but linguists strive to discover
properties of the language by a process of scientific inquiry and
then to codify their discoveries in a grammar.

Artificial Intelligence
-

A Modern Approach
, 2nd Edition, by Russell, S., and
Norvig
,
P., 1995, Prentice Hall, pp. 791
-
792



9

Ontology in Computer Science


Needs for Ontologies in Computer Science



Formal Languages


A finite set of signs
(alphabet)

and a finite set of production rules
(grammar)

produces an infinite set of expressions or sentences that
define the language.



Producing a syntactic correct language does
not

mean that one has
captured the meaning and sense of the sentences
of a given language.



Ontology


Ontology means to bridge the “semantic gap” existing between the
actual
syntactic representation of information (symbol)

and its
conceptualization (concept).



Sharing or reusing knowledge across systems becomes difficult, as
different systems
use
different terms
for describing information.

Ontology in Computer Science


Thus



Ontology describes a formal specification of a certain domain:



Shared understanding of a domain of interest


Formal and machine manipulatable model of a domain of interest



“An explicit specification of a conceptualization” [Gruber93]



Ontology is a term borrowed from philosophy that refers to the
science of describing the kinds of entities in the world and how they
are related
.
[OWL Guide
-

http://www.w3.org/TR/owl
-
guide
]



Ontologies are used
to capture knowledge about some domain of
interest.

An ontology describes the
concepts

in the domain and also
the
relationships

that hold between those concepts.
[ http://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/ resources/ ProtegeOWLTutorialP4_v1_2]



11

Ontology


Its origin


Plato (427
-
347 B.C.)



Plato dealt with the question of
proper naming of the things
.



Plato’s opinion: the use of names in an “optimal world” would be
ensure that a particular expression will make everybody think of
one
and only one thing
.



Plato’s doubt: However, he was doubtful that
perfect names could
ever be given
, because things are
continually changing



12

Ontology


Its origin


Aristotle (384
-
322 B.C )



Aristotle’s work was interested in
definitions. (cf. name)



His notion of definition was not simply the meaning of a word.



Definition was meant
-

to
clearly explain what a thing is

by being a statement of the “essence” of the entity.



Therefore, he believe that to
say
what

something is
always requires
to say
why

something is
.

13

Ontology


Its origin


Gottlob Frege (1848


1925)



Aristotle’s foundation was
not sufficient



He ignored the unavoidable limitation of communicating meaning via
language

and the ambiguities created by
implicit exchange of
different “senses” of meaning
.


------------------------------------------------------------------------------------------



Understanding such ambiguities was a topic considered

by Gottlob Frege



introduced a distinction of two types of meaning


the concept and the referent (thing)



14

Ontology


Its origin


Ogden and Richards
-

Meaning Triangle (MT) (1923)



MT
-

Graphical interpretation of this distinction


MT
-

defines the interaction between
symbol
s (or words)
,
thought
s

and
thing
s

of the real world




Concept

(thought or

reference)

Thing

(referent)

Symbol

(word)


敶o步k



獴慮d猠景r



r敦敲猠瑯

Fig ㈮ㄮ Th攠M敡eing Tri慮gle



15

Ontology


Its origin

“Tank“

Referent

Form

Stands for

Relates to

activates

Concept

[Ogden, Richards, 1923]

?



Concept

Symbol/

Terms

Thing

evokes

refers to

stands for

rabbit

‘Rabbit’ is an animal with long ears

bunny



16

Ontologies

for Communication


A Layered Approach


The Ontology Structure


The Knowledge Base Structure



17

A Layered Approach


Overall setting for communication between human and machine
agents (Fig 2.2)



Three layered communication



Consider
things

that exist in the real world:




Human, machine agent, cars, animals



Consider
symbols

and
syntactic structures

that are exchanged



Models with their specific associated
thoughts

and

semantic structures

are analyzed

18

A Layered Approach

=

=

Fig 2.2. Ontologies for Communication



19

Ontology &
Knowledge Base
structure


Ontology Structure



Definition 2.1 An Ontology Structure (O) is a 5
-
tuple


Definition 2.2 A lexicon for the ontology structure




Knowledge Base Structure



Definition 2.3 A Knowledge Base Structure is a 4
-
tuple


Definition 2.4 A lexicon for the knowledge base structure





20

Example

Organization

Works at
Organization

Person

Employee

x
3

x
1

x
2

H
c

(x
2
, x
1
)


x
4
(x
2
, x
3
)

[Fig2.3. Example: Instantiated Ontology structure]

Employee is a person who works at organization

Ontology Languages


Wide variety of languages for “Explicit Specification”



Graphical notations


Semantic networks


Topic Maps (see http://www.topicmaps.org/)


UML


RDF


Logic based


First Order Logic
(e.g., KIF)


Description Logics
(e.g., OIL, DAML+OIL,
OWL
)


Conceptual graphs


(Syntactically) higher order logics (e.g., LBase)


Non
-
classical logics (e.g., Flogic, Non
-
Mon, modalities)


Probabilistic/fuzzy


Degree of formality varies widely


Increased formality makes languages more amenable to machine processing

(e.g., automated reasoning)

21

22

Ontology Languages

Organization

Person

Employee

Is_A

Works_at

Employee is a person who works at organization

Natural Language :

Semantic Network :

First
-
Order Logic:


g,c Grandparent (g,c)



p 偡P敮琨t,p⤠


偡P敮琨t,挩

Description Logics :

Grandmother ≡ Mother
П

hasChild.Parent

First Order Logic (FOL)


The kinship domain (axioms)



One’s mother is one’s female parent:



m, c Mother(c)=m


Female(m)


Parent(m, c)



One’s husband is one’s male spouse:



w, h Husband(h,w)


Male(h)


Spouse(h, w)



Male and female are disjoint categories:



x Male(x)



Female(x)



Parent and child are inverse relations:


p,c Parent(p,c)


Child (c,p)



A grandparent is a parent of one's parent


g,c Grandparent (g,c)



p Parent(g,p)


Parent(p,c)



Sibling is another child of one’s parents


x,y Sibling(x,y)


x≠y



p Parent(p,x)


Parent(p,y)

23

Russell, S., and Norvig, P., 1995,

Artificial Intelligence
-

A Modern Approach
, 2
nd

Edition

Prentice Hall, pp. 240
-
271.

Description Logics (DL)


The kinship domain



TBox

Woman ≡ Person
П
Female

Man ≡ Person
П ¬
Woman

Mother ≡ Woman
П

hasChild.Person

Father ≡ Man
П

hasChild.Person

Parent ≡ Father U Mother

Grandmother ≡ Mother
П

hasChild.Parent

MotherWithManyChildren ≡ Mother
П ≥

3

hasChild

MotherWithoutDaughter ≡ Mother
П

hasChild.¬Woman

Wife ≡ Woman
П

hasHusband.Man



ABox

MotherWithoutDaughter(MARY) Father(PETER)

hasChild(MARY, PETER) hasChild(PETER, HARRY)

hasChild(MARY, PAUL)

24

The Description Logics Handbook

Theory, implementation, and application

By Franz Baader, etl

Cambridge University Press, pp43
-
95

OWL : Web Ontology Language



25

Woman ≡ Person П Female



<owl:Class rdf:about="#
Woman
">


<owl:
equivalentClass
>


<owl:Class>


<owl:
intersectionOf

rdf:parseType="Collection">


<owl:Class rdf:about="#
Person
"/>


<owl:Class rdf:ID="
Female
"/>


</owl:intersectionOf>


</owl:Class>


</owl:equivalentClass>


</owl:Class>

OWL : Web Ontology Language


OWL


the Web Ontology Language


W3C standard



Three ‘flavors’


OWL
-
Lite


limited expressivity but simple


OWL
-
DL


matches what DL researchers believe they can deliver


OWL
-
Full


fully expressive with no computational guarantees



OWL Constructors

O : Class

→: Property


: Individual

OWL


Protégé



27

O : Class

→: Property


: Individual

OWL


Protégé



28

O : Class

→: Property


: Individual

OWL


Protégé



29

SWRL: Semantic Web Rule Language


SWRL



SWRL is an acronym for Semantic Web Rule Language.


SWRL is intended to be the rule language of the Semantic Web.


SWRL is based on OWL:

all rules are expressed in terms of OWL concepts

(classes, properties, individuals, literals…).




SWRL Rule



If A then B


Person(?p)


桡獓i扬b湧n㽰Ⱐ㽳⤠


Man(?s)
-
> hasBrother(?p, ?s)


isTwinwith(?x, ?y)


hasParent(?y, ?z)
-
> hasParent(?x, ?z)


Antecedent

Consequent

Example SWRL Rule


SWRL Rule:
hasBrother



Person(?p) ^ hasSibling(?p, ?s) ^ Man(?s)
-
> hasBrother(?p, ?s)



Person(
Fred
) ^ hasSibling(
Fred
, ?s) ^ Man(?s)
-
> hasBrother(
Fred
, ?s)




SWRL Rule with Built
-
ins



hasBrother(?x1,?x2) ^ hasAge(?x1,?age1) ^ hasAge(?x2,?age2) ^
swrlb:greaterThan
(?age2,?age1) → hasOlderBrother(?x1,?x2)



hasBrother(?x1,?x2) ^ hasAge(?x1,?age1) ^ hasAge(?x2,?age2) ^
swrlb:subtract
(10,?age2,?age1) → hasDecadeOlderBrother(?x1,?x2)

SWRL


Protégé

OWL/SWRL integration

Ontology Base (OWL)

Class

Individual

Rule Base (SWRL)

Rules

Protégé

Jess
Rule
Engine

Rules

Facts

Reasoning (Fwd Chaining)

New Facts

Convert to

Jess Syntax

Convert to

OWL Syntax

Reasoning

(Subsumption, Classification)

Prop.

Create New Class, Property, Instance, Rule


isTwinwith : Property creation


isTwinwith(?x, ?y)



M11 and M12 are Twin relation : Defining Instances


isTwinwith(?x, ?y)


isTwinwith(M11,M12)



M01 and F01 are parents of M11 : Defining Instances


hasParent(?x, ?z)


hasParent(M11,M01)


hasParent(M11,F01)



M11’s parents are M12’s parents


isTwinwith(?x, ?y)


hasParent(?x, ?z) → hasParent(?y, ?z)


isTwinwith(M11,M12)


hasParent(M11,M01) → hasParent(M12,M01)


isTwinwith(M11,M12)


hasParent(M11,F01) → hasParent(M12,F01)



Class, Property, Instance, Rule

Reasoning


isTwinwith(?x, ?y)


hasParent(?x, ?z) → hasParent(?y, ?z)


isTwinwith(M11,M12)


hasParent(M11,M01) → hasParent(M12,M01)


isTwinwith(M11,M12)


hasParent(M11,F01) → hasParent(M12,F01)



Person(?x)


hasParent(?x, ?y)


Man(?y) → hasFather(?x, ?y)


Person(M12)


hasParent(M12,M1)


Man(M01) → hasFather(M12,M01)



Person(?x)


hasParent(?x, ?y)


Woman (?y) → hasMother(?x, ?y)


Person(M12)


hasParent(M12,F1)


Woman(F01) → hasMother(M12,F01)



Before Jess Reasoning

After Jess Reasoning