OWL TUTORIAL APT CSA 3003 OWL ANNOTATOR Charlie Abela CSAI Department.
-
Upload
everett-green -
Category
Documents
-
view
217 -
download
0
Transcript of OWL TUTORIAL APT CSA 3003 OWL ANNOTATOR Charlie Abela CSAI Department.
OWL TUTORIAL
APT CSA 3003 OWL ANNOTATOR
Charlie AbelaCSAI Department
2 Charlie Abela
OWL TUTORIAL
Outline
Ontologies Web Ontology Language: OWL Flavours of OWL Some Differences Classes Properties Individuals Namespaces and Headers
3 Charlie Abela
OWL TUTORIAL
Ontologies Ontologies were developed in Artificial Intelligence
to facilitate knowledge sharing and reuse. Ontologies provide a machine-processable
semantics of information sources that can be communicated between different agents
An ontology is a formal, explicit specification of a shared conceptualisation [Gruber, 1993] A ‘conceptualisation’ refers to an abstract model of
some phenomenon in the world which identifies the relevant concepts of that phenomenon.
‘Explicit’ means that the type of concepts used and the constraints on their use are explicitly defined.
‘Formal’ refers to the fact that the ontology should be machine readable.
4 Charlie Abela
OWL TUTORIAL
OWL Web Ontology Language is a language for
defining and instantiating Web ontologies OWL is intended to provide a language that
can be used to describe the classes and relations (properties) between them that are inherent in Web documents and applications.
OWL has more facilities for expressing meaning and semantics than XML, RDF, and RDF-S Reasoning capabilities provided by tools
5 Charlie Abela
OWL TUTORIAL
Flavours of OWL OWL Lite supports those users primarily
needing a classification hierarchy and simple constraint features
OWL DL supports those users who want the maximum expressiveness without losing computational completeness and decidability of reasoning systems
OWL Full is meant for users who want maximum expressiveness and the syntactic freedom of RDF with no computational guarantees
6 Charlie Abela
OWL TUTORIAL
Some Differences OWL Lite supports cardinality constraints, but it
only permits cardinality values of 0 or 1 In OWL Lite and OWL DL an individual can never
be at the same time a class: classes and individuals form disjoint domains
In OWL Lite there is no support for boolean constructors, unionOf (OR) and complementOf (not). Some limited support for intersectionOf (AND)
In OWL Lite there is no support for one of (EnumeratedClass) constructor.
7 Charlie Abela
OWL TUTORIAL
Class Descriptions A class identifier (a URI reference)
<owl:Class rdf:ID="Human"/> A property restriction: value
Universal Quantifier (Class of all individuals whose Parents are Human)
<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:allValuesFrom rdf:resource="#Human"/</owl:Restriction> Existential Quantifier (Class of individuals who have at least one parent a Physician)
<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:someValuesFrom rdf:resource="#Physician" /> </owl:Restriction>
8 Charlie Abela
OWL TUTORIAL
Class Descriptions (2) A property restriction: cardinality
<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" />
<owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">2</owl:maxCardinality></owl:Restriction>
Other constructs: minCardinality and cardinality The intersectionOf two or more class
descriptions <owl:Class rdf:ID="Woman">
<owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Female"/> <owl:Class rdf:about="#Human"/>
</owl:intersectionOf> </owl:Class/>
9 Charlie Abela
OWL TUTORIAL
Class Axioms Class descriptions form the building blocks for defining
classes through class axioms: rdfs:subClassOf owl:equivalentClass
<owl:Class rdf:about="#Opera"> <rdfs:subClassOf>
<owl:Restriction> <owl:onProperty rdf:resource="#hasLibrettist" />
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction> </rdfs:subClassOf> </owl:Class>
<owl:Class rdf:about="#US_President"> <owl:equivalentClass rdf:resource="#ResidentOfWhiteHouse"/></owl:Class>
10 Charlie Abela
OWL TUTORIAL
Properties OWL distinguishes between two
types of properties:Object properties: have a value range
of class individuals, and thus link individuals to individuals.
Datatype properties have a value range of data values, and thus link individuals to data values.
11 Charlie Abela
OWL TUTORIAL
Properties (2)<owl:ObjectProperty rdf:ID="course">
<rdfs:domain rdf:resource="#Meal" />
<rdfs:range rdf:resource="#MealCourse" /> </owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="yearValue"> <rdfs:domain rdf:resource="#VintageYear" /> <rdfs:range rdf:resource="&xsd;positiveInteger"/> </owl:DatatypeProperty>
<owl:ObjectProperty rdf:ID="hasMother"> <rdfs:subPropertyOf rdf:resource="#hasParent"/> </owl:ObjectProperty>
12 Charlie Abela
OWL TUTORIAL
Property CharacteristicsinverseOf
<owl:ObjectProperty rdf:ID="hasChild"> <owl:inverseOf rdf:resource="#hasParent"/>
</owl:ObjectProperty>
FunctionalProperty: is a property that can have only one(unique) value y for each instance x.
<owl:ObjectProperty rdf:ID="husband"> <rdf:type rdf:resource="&owl;FunctionalProperty" /> <rdfs:domain rdf:resource="#Woman" /> <rdfs:range rdf:resource="#Man" />
</owl:ObjectProperty> ( a Woman can have only one husband)
InverseFunctionalProperty: where a range value uniquelydetermines the domain value
<owl:InverseFunctionalProperty rdf:ID="biologicalMotherOf"> <rdfs:domain rdf:resource="#Woman"/> <rdfs:range rdf:resource="#Human"/>
</owl:InverseFunctionalProperty> (every human has only one biological mother)
13 Charlie Abela
OWL TUTORIAL
Logical Property Characteristicsowl:TransitiveProperty:
P(x,y) and P(y,z) implies P(x,z)
<owl:TransitiveProperty rdf:ID="subRegionOf"> <rdfs:domain rdf:resource="#Region"/> <rdfs:range rdf:resource="#Region"/>
</owl:TransitiveProperty>
owl:SymmetricProperty: P(x,y) iff P(y,x)
<owl:SymmetricProperty rdf:ID="friendOf"> <rdfs:domain rdf:resource="#Human"/> <rdfs:range rdf:resource="#Human"/>
</owl:SymmetricProperty>
14 Charlie Abela
OWL TUTORIAL
IndividualsIndividual axioms are statements about individuals,indicating class membership and statements aboutrelevant properties
<Opera rdf:ID="Tosca"> <hasComposer rdf:resource="#Giacomo_Puccini"/> <hasLibrettist rdf:resource="#Victorien_Sardou"/> <hasLibrettist rdf:resource="#Giuseppe_Giacosa"/> <hasLibrettist rdf:resource="#Luigi_Illica"/> <premiereDate rdf:datatype="&xsd;date">1900-01-
14</premiereDate> <premierePlace rdf:resource="#Roma"/> <numberOfActs
rdf:datatype="&xsd;positiveInteger">3</numberOfActs></Opera>
15 Charlie Abela
OWL TUTORIAL
Individual Identity On the web it is not possible to have unique
names for different things. OWL provides three constructs for making
statements about the identity of individuals: owl:sameAs is used to state that two URI
references refer to the same individual. The construct owl:sameIndividualAs is a synonym of owl:sameAs
owl:differentFrom is used to state that two URI references refer to different individuals
owl:AllDifferent provides an idiom for stating that a list of individuals are all different.
16 Charlie Abela
OWL TUTORIAL
Individual Identity (2)<Wine rdf:ID="MikesFavoriteWine">
<owl:sameAs rdf:resource="#StGenevieveTexasRed" /></Wine>
<WineSugar rdf:ID="Sweet"> <owl:differentFrom rdf:resource="#Dry"/>
</WineSugar>
<owl:AllDifferent> <owl:distinctMembers rdf:parseType="Collection"> <vin:WineColor rdf:about="#Red" />
<vin:WineColor rdf:about="#White" /> <vin:WineColor rdf:about="#Rose" />
</owl:distinctMembers> </owl:AllDifferent>
owl:distinctMembers can only be used in combination withowl:AllDifferent
17 Charlie Abela
OWL TUTORIAL
Namespaces<rdf:RDF
xmlns ="http://www.w3.org/TR/………../wine#" xmlns:vin ="http://www.w3.org/TR/……/wine#" xml:base ="http://www.w3.org/TR/……./wine#" xmlns:food="http://www.w3.org/TR/….../food#" xmlns:owl ="http://www.w3.org/2002/07/owl#" xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd ="http://www.w3.org/2001/XMLSchema#">
Abbreviations can be defined using an ENTITY definition
<!DOCTYPE rdf:RDF [ <!ENTITY vin "http://www.w3.org/TR/………/wine#"<!ENTITY food "http://www.w3.org/TR/……../food#" > ]>
<rdf:RDF xmlns ="&vin;" xmlns:vin ="&vin;" xml:base ="&vin;" xmlns:food="&food;" …….>
18 Charlie Abela
OWL TUTORIAL
Headers
<owl:Ontology rdf:about=""> <rdfs:comment>Example OWL ontology</rdfs:comment> <owl:priorVersionrdf:resource="http://www.w3.org/../wine"/> <owl:imports rdf:resource="http://www.w3.org/……/food"/> <rdfs:label>Wine Ontology</rdfs:label>
……….</owl:Ontology>
19 Charlie Abela
OWL TUTORIAL
Importing Ontologies owl:imports: references another OWL
ontology containing definitions, whose meaning is considered to be part of the meaning of the importing ontology.
If an OWL Lite ontology imports an OWL DL or OWL Full ontology, it effectively becomes an OWL DL or OWL Full ontology.
If ontology A imports B, and B imports C, then A imports both B and C