An Introduction to Ontologies

sounderslipInternet και Εφαρμογές Web

22 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

67 εμφανίσεις

Internet Technologies

An Introduction to Ontologies
in OWL

Bibliography

The OWL Guide

The OWL Overview

Description Logic slides from Enrico Franconi

Artificial Intelligence A Modern Approach by Russel and Nordig

Internet Technologies

What is an Ontology?


A representation of terms and their
interrelationships (OWL Overview)


A formal conceptualization of the world


Smart data

Internet Technologies

Ontology Languages


Typically introduce concepts, properties,
relationships between concepts and
constraints


May be expressed with diagrams


ER Diagrams and UML Class Diagrams
are ontology languages


OWL (The Web Ontology Language) is
expressed in XML


OWL is a distributed ontology language

Internet Technologies

The OWL Language


February 10, 2004 OWL and RDF become W3C
Recommendations


See Jena from Hewlett
-
Packard Research for an
existing Java API


See Protégé
-
2000 at Stanford University for an
existing OWL editor


Big names in this space include Jim Hendler,
and Debra McGuiness


A large example can be found at
http://www.mindswap.org/2003/CancerOntology/
nciOncology.owl

Internet Technologies

From the W3C

Internet Technologies

The three sublanguages of OWL


OWL Lite (decidable)


OWL DL (Description Logic) (Decidable)


OWL Full (Allows classes as instances)



As we move from OWL Lite to OWL full we
increase expressiveness and logical
complexity.

Internet Technologies

Decidability


A proof procedure r is incomplete if there
are true statements that the procedure
cannot infer.


Godel (1930’s) showed that, for first order
logic, any statement entailed by a set of
statements can be proved from the set. In
other words, a proof procedure exists.


In 1965, Robinson found the resolution
method.

Internet Technologies

Decidability


But, entailment is semi
-
decidable. If a
statement does not follow from the
premises it may go on and on.

Resolution is complete

Premises

Statment S

If S follows the proof

of S will emerge after

some time.

If S does not follow

the procedure may loop

forever.

Internet Technologies

OWL Lite is a Decidable Language


A
Class

is a set of individuals


The class
Thing

is the superclass of all
OWL classes


The class
Nothing

is a subclass of all OWL
classes and has no individuals members


Classes may be defined as
subClasses

of
other classes

Internet Technologies

Three classes that subclass Thing

<owl:Class rdf:ID=“Winery”/>

<owl:Class rdf:ID=“Region”/>

<owl:Class rdf:ID=“ConsumableThing”/>


These terms may be referred to from within this

Document by ‘#Winery’,’ #Region’ and

‘#ConsumableThing’.


Other ontologies may refer to these terms with

‘SomeURI#Winery’, ‘SomeURI#Region’ and so on.

Internet Technologies

Class Hierarchies built with
subClassOf

<owl:Class rdf:ID=“PotableLiquid”>


<rdfs:subClassOf rdf:resource = “#ConsumableThing” />




</owl:Class>


<owl:Class rdf:ID=“EdibleThing”>


<rdfs:subClassOf rdf:resource = “#ConsumableThing” />




</owl:Class>

Deduction:



If x is a PotableLiquid

then x is a ConsumableThing

Internet Technologies

Wine and Pasta

<owl:Class rdf:ID=“Wine”>


<rdfs:subClassOf rdf:resource =
“#PotableLiquid” />




</owl:Class>


<owl:Class rdf:ID = “Pasta”

<rdfs:subClassOf rdf:resource = “#EdibleThing” />



</owl:Class>



Deduction:


If x is Pasta then x is

a ConsumableThing

Internet Technologies

SweetFruit and NonSweetFruit

<owl:Class rdf:ID=“SweetFruit”> <!


food.xml
--
>


<rdfs:subClassOf


rdf:resource=“#EdibleThing”/>

</owl:Class>


<owl:Class rdf:ID=“NonSweetFruit”> <!


food.xml
--
>


<rdfs:subClassOf


rdf:resource=“#EdibleThing”/>




</owl:Class>

Internet Technologies

Defining Individuals

<Region rdf:ID=“CentralCoastRegion”/>



Is identical to


<owl:Thing rdf:ID=“CentralCoastRegion”/>

<owl:Thing rdf:about=“#CentralCoatRegion”>


<rdf:type rdf:resource=“#Region”/>

</owl:Thing>



Internet Technologies

Another individual

<owl:Class rdf:ID=“Grape”> <!


food.xml
--
>


<rdfs:subClassOf rdf:resource=“#SweetFruit”/>

</owl:Class>


<!


wine.xml
--
>

<owl:Class rdf:ID=“WineGrape”>


<rdfs:subClassOf rdf:resource=“&food;Grape”/>

</owl:Class>


<WineGrape rdf:ID=“CabernetSauvignonGrape” />

Deduction: CabernetSauvignon is a SweetFruit

So far we have…





Thing

Winery

Region

ConsumableThing

PotableLiquid

EdibleThing

SweetFruit

NonSweetFruit

Pasta

Grape

WineGrape


CabernetSauvignonGrape



CentralCoastalRegion

Wine

Internet Technologies

So far we have …


Classes


Individuals


We now need properties to state facts
about classes and facts about individuals

Internet Technologies

Properties


Properties are binary relations


A binary relation R from a set X to a set Y
is a subset of the Cartesian product X x Y.
If (x,y)
ε

R, we write xRy and say x is
related to y.

Internet Technologies

Binary Relations

Suppose the set X has members {a,b} and

the set Y has members {c,d,e}.


XxY = {(a,c),(a,d),(a,e),(b,c),(b,d),(b,e)}

Let R = {(a,c),(b,e)}


Since (a,c)
ε

R and (b,e)
ε

R we write aRc

and bRe.


Notice that a binary relation is a set of ordered pairs.



Internet Technologies

The set {x
ε

X | (x,y)
ε

R for some y
ε

Y} is
called the domain of R.


The domain of R = {(a,c),(b,e)} is {a,b}.


The set {y
ε

Y | (x,y)
ε

R for some x
ε

X} is
called the range of R.


The range of R = {(a,c),(b,e)} is {c,e}.

Domain and Range

Internet Technologies

Properties


R is Transitive if and only if


xRy and yRz imply xRz


locateIn is transitive in the wine ontology


R is Symmetric if and only if



xRy iff yRx


adjacentTo is symmetric in the wine
ontology

Internet Technologies

Properties



R is Functional if and only if


xRy and xRz implies y = z


hasVintageYear is functional in the wine


ontology


R
1

and R
2

are Inverse Properties if and only if


xR
1
y iff yR
2
x


hasMaker and producesWine are inverse


relations in the wine ontology

Internet Technologies

OWL’s Property Hierarchy


Thing is a superset of Property


Property is a superset of ObjectProperty


Property is a superset of DataProperty



An ObjectProperty associates a class
instance with another class instance.


A DataProperty associates a class
instance with a datatype value

Internet Technologies

OWL’s Property Hierarchy Example

Thing

Mammal

Person



Mike



Sue

ObjectProperty




DataProperty

Property

hasRelative



hasSibling



(Mike,Sue)

hasAge



(Mike,23)

Indentation shows subset

relationships.

Set
elements

are marked

with dots.

Internet Technologies

OWL Property Syntax

<owl:ObjectProperty rdf:ID=“locatedIn”>


<rdfs:domain


rdf:resource=“OWLURI#Thing”/>


<rdfs:range


rdf:resource=“#Region”/>

</owl:ObjectProperty>


“OWLURI” will actually appear as the official OWL URI.

Internet Technologies

Adding pairs to locatedIn

<Region rdf:ID=“SantaCruzMountainsRegion”>


<locatedIn rdf:resource=“#CaliforniaRegion”/>

</Region>


<CabernetSauvignon


rdf:ID=
“SantaCruzMountainVinyardCabernetSauvignon”>


<locatedIn
rdf:resource=“#SantaCruzMountainsRegion”/>




</CabernetSauvignon>


Can we make a

deduction?

Internet Technologies

locatedIn


locatedIn is defined as a set of ordered pairs.


Each pair must contain an owl:Thing (maybe a Region)


followed by value from the set Region.



For example:


locatedIn =


{(SantaCruzMountainsRegion, CaliforniaRegion),


(SantaCruzMountainVinyardCabernetSauvignon,


SantaCruzMountainsRegion)…}



A deduction like the following is not yet possible…


The Thing SantaCruzMountainVinyardCabernetSauvignon


is locatedIn CaliforniaRegion



Internet Technologies

locatedIn is Transitive

<owl:ObjectProperty rdf:ID=“locatedIn”>


<rdf:type rdf:resource=“TransitiveProperty” />
<!


include an OWLURI
--
>


<rdfs:domain


rdf:resource=“OWLURI#Thing”/>


<rdfs:range


rdf:resource=“#Region”/>

</owl:ObjectProperty>




A deduction like the following is now possible…


The Thing SantaCruzMountainVinyardCabernetSauvignon


is locatedIn CaliforniaRegion



Internet Technologies

Given the madeFromGrape
property

<owl:ObjectProperty
rdf:ID=“madeFromGrape”>


<rdfs:domain rdf:resource=“#Wine”/>


<rdfs:range rdf:resource=“#WineGrape”/>

</owl:ObjectProperty>

madeFromGrape

(#Wine,#WineGrape)

(#Wine,#WineGrape)

Internet Technologies

And…

<owl:Thing
ref:ID=“LindemansBin65Chardonnay”>


<madeFromGrape
rdf:resource=“#ChardonnayGrape”/>

<owl:Thing>


We can deduce that
LindemansBin65Chardonnay is a Wine.

Internet Technologies

Given a Property…

<owl:Class rdf:ID=“WineDescriptor”/>

<owl:Class rdf:ID=”WineColor”>


<rdfs:subClassOf rdf:resource=“WineDescriptor”/>





<owl:Class>

<owl:ObjectProperty rdf:ID=“hasWineDescriptor”>


<rdfs:domain rdf:resource=“#Wine”/>


<rdfs:range rdf:resource=“#WineDescriptor”/>

<owl:ObjectProperty>


Internet Technologies

We can define a subproperty

<owl:ObjectProperty rdf:ID=“hasColor”>


<rdfs:subPropertyOf rdf:resource=“#hasWineDescriptor”/>


<rdfs:domain rdf:resource=“#Wine”/>


<rfds:range rdf:resource = “#WineColor” />




</owl:ObjectProperty>






hasWineDescriptor

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineColor)

(#Wine,#WineColor)

Internet Technologies

And make it functional.

<owl:ObjectProperty rdf:ID=“hasColor”>


<rdf:type rdf:resource=“&owl;FunctionalProperty”/>


<rdfs:subPropertyOf rdf:resource=“#hasWineDescriptor”/>


<rdfs:domain rdf:resource=“#Wine”/>


<rfds:range rdf:resource = “#WineColor” />




</owl:ObjectProperty>






hasWineDescriptor

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineDescriptor)

(#Wine,#WineColor)

(#Wine,#WineColor)

Now, for each Wine, there

can be at most one WineColor.


Internet Technologies

<owl:Class rdf:ID=“Wine”>


<rdfs:subClassOf rdf:resource = “&food;#PotableLiquid” />


<rdfs:subClassOf>


<owl:Restriction>


<owl:onProperty rdf:resource=“#madeFromGrape”/>


<owl:minCardinality rdf:datatype=


“&xsd;nonNegativeInteger”>1


</owl:minCardinalty>


</owl:restriction>


<rdfs:subClassOf>




</owl:Class>

Anonymous Classes

So, those Things that are in

the PotableLiquid set that are

also in the set of things made

from at least one grape are

Wines. If we know that x is

a Wine then we know it has at

least one madeFromGrape

property defined.

Internet Technologies

A Wine Individual

<CabernetSauvignon


rdf:ID= “SantaCruzMountainVinyardCabernetSauvignon”>


<locatedIn rdf:resource=“#SantaCruzMountainsRegion”/>


:

</CabernetSauvignon>


This says nothing about what grape it’s made from. To find that out

we must look to the class CabernetSauvignon. There we learn all

wines of this variety are madeFromGrape CabernetSauvignon.


So, individuals inherit properties and property values from their class.



Internet Technologies

What does this mean?

<owl:Class rdf:ID="#Student">


<owl:intersectionOf rdf:parseType="Collection">


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


<owl:Restriction>


<owl:onProperty rdf:resource="#enrolledIn"/>


<owl:minCardinality rdf:datatype=


"&xsd;nonNegativeInteger"> 1


</owl:minCardinality>


</owl:Restriction>


</owl:intersectionOf>

</owl:Class>


Internet Technologies

And this?

<Student rdf:ID="John">


<friendOf>


<Student rdf:resource="#Peter" />


</friendOf>

</Student>


Internet Technologies

How about this one?

<Student rdf:about="
http://www.student.org#DanielaRenuncio

">


<owl:
sameIndividualAs

rdf:resource=


"http://www.student.org#Daniela_de_Senna_Eyng_Renuncio"/>

</Student>