owl 2 in use. owl 2 owl 2 is a knowledge representation language, designed to formulate, exchange...

20
OWL 2 in use

Upload: melissa-ellis

Post on 31-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

OWL 2 in use

2

OWL 2

• OWL 2 is a knowledge representation language, designed to formulate, exchange and reason with knowledge about a domain of interest.

• The basic notions of OWL 2 are: • Axioms: the basic statements that an OWL ontology

expresses • Entities: elements used to refer to real-world objects • Expressions: combinations of entities to form complex

descriptions from basic ones • We can also draw consequences from knowledge

• Reasoners – tools that can automatically compute consequences.

PathoNGenTrace REST API workshop, January 2013

PathoNGenTrace REST API workshop, January 2013

3

• In general classes are used to group individuals that have something in common in order to refer to them.• classes essentially represent sets of individuals.

Classes and Instances

Isolate Species

0021/84 Neisseria_meningitidis

rdf:type rdf:type

classes

instances

Ontology Level

Data Level

PathoNGenTrace REST API workshop, January 2013

4

• In general classes are used to group individuals that have something in common in order to refer to them.• classes essentially represent sets of individuals.

Classes and Instances

<owl:Class rdf:about="http://rest.phyloviz.net/ontology#Isolate">

<owl:NamedIndividual rdf:about="http://rest.phyloviz.net/ontology#Neisseria_meningitidis"> <rdf:type rdf:resource="http://rest.phyloviz.net/ontology#Species"/> </owl:NamedIndividual>

Class Isolate

Individual Neisseria_meningitidis

PathoNGenTrace REST API workshop, January 2013

5

• In OWL 2, this is done by a so-called subclass axiom:

Class Hierarchies

<owl:Class rdf:about="http://rest.phyloviz.net/ontology#MLST"> <rdfs:subClassOf rdf:resource="http://rest.phyloviz.net/ontology#MultiLocus"/> </owl:Class>

MultiLocus

MLST

subClassOf

What can be inferred with respect to Individuals?

• Subclass relationship between classes is transitive e reflexive• Do we have examples of transitivity in typon?

PathoNGenTrace REST API workshop, January 2013

6

• Equivalence: classes may effectively refer to the same sets of individuals.

• Disjointness: defines an incompatibility relationship between classes.

Equivalence and Disjoint Classes

<owl:Class rdf:about=”MultiLocus"> <owl:equivalentClass rdf:resource=”multi_locus"/> </owl:Class>

Are these classes disjoint?

MultiLocus

MLST

SingleLocus

spaTyping

ccrBTypingemmTyping

PathoNGenTrace REST API workshop, January 2013

7

• Specify how the individuals relate to other individuals.• Order in which the individuals are written is important.

Object Properties

<owl:ObjectProperty rdf:about=http://rest.phyloviz.net/ontology#belongsToSpecies> </owl:ObjectProperty>

And what is the order?

<rdf:Description rdf:about="0021/84"> <belongsToSpecies rdf:resource=“Neisseria_meningitidis"/> </rdf:Description>

<rdf:Description rdf:about="Neisseria_meningitidis"> <belongsToSpecies rdf:resource=“0021/84"/> </rdf:Description>

PathoNGenTrace REST API workshop, January 2013

8

<owl:ObjectProperty rdf:about="http://rest.phyloviz.net/ontology#belongsToSpecies"> <rdfs:range rdf:resource="http://rest.phyloviz.net/ontology#Species"/> <rdfs:domain rdf:resource="http://rest.phyloviz.net/ontology#Isolate"/></owl:ObjectProperty>

Domain and Range Restrictions

• Two axioms for defining the domain and range of properties (object or data)

Having these two axioms and also

<rdf:Description rdf:about="0021/84"> <belongsToSpecies rdf:resource=“Neisseria_meningitidis"/> </rdf:Description>

What the reasoner can infer?

PathoNGenTrace REST API workshop, January 2013

9

• OWL does not make the assumption that different names are names for different individuals.

Equality and Inequality of Individuals

<rdf:Description rdf:about=“Neisseria_meningitidis"> <owl:differentFrom rdf:resource=”Homo_sapiens"/> </rdf:Description>

<rdf:Description rdf:about=“HomoSapiens"> <owl:sameAs rdf:resource=”Homo_sapiens"/> </rdf:Description>

PathoNGenTrace REST API workshop, January 2013

10

• These properties relate individuals to data values (instead of to other individuals), and many of the XML Schema datatypes can be used.

• Domain and range can also be stated for datatype properties as it is done for object properties

Datatype properties

<owl:DatatypeProperty rdf:about="http://rest.phyloviz.net/ontology#ST"><rdfs:domain rdf:resource="http://rest.phyloviz.net/ontology#MLST"/> <rdfs:range rdf:resource="&xsd;string"/> </owl:DatatypeProperty>

PathoNGenTrace REST API workshop, January 2013

11

Advanced Class Relationships-- Complex Classes• Named classes, properties, and individuals can be used as building

blocks to define new classes • Intersection of two classes consists of exactly those individuals

which are instances of both classes • Union of two classes contains every individual which is

contained in at least one of these classes.• Complement of a class corresponds to logical negation.

Does Typon has examples using this constructors?

PathoNGenTrace REST API workshop, January 2013

12

Advanced Class Relationships-- Complex Classes

Union

<owl:ObjectProperty rdf:about="http://rest.phyloviz.net/ontology#belongsToSpecies"> <rdfs:range rdf:resource="http://rest.phyloviz.net/ontology#Species"/> <rdfs:subPropertyOf rdf:resource="&owl;topObjectProperty"/> <rdfs:domain> <owl:Class> <owl:unionOf rdf:parseType="Collection"> <rdf:Description rdf:about="http://rest.phyloviz.net/ontology#Gene"/> <rdf:Description rdf:about="http://rest.phyloviz.net/ontology#Host"/> <rdf:Description rdf:about="http://rest.phyloviz.net/ontology#Isolate"/> </owl:unionOf> </owl:Class> </rdfs:domain></owl:ObjectProperty>

PathoNGenTrace REST API workshop, January 2013

13

Advanced Class Relationships-- Property Restrictions• Existential quantification: defines a class as the set of all

individuals that are connected via a particular property to another individual which is an instance of a certain class

Does Typon has examples of this restriction?

Let’s think about the object property hasSpecies.

<owl:Restriction> <owl:onProperty rdf:resource="http://rest.phyloviz.net/ontology#hasSpecies"/> <owl:someValuesFrom rdf:resource="http://rest.phyloviz.net/ontology#Species"/></owl:Restriction>

PathoNGenTrace REST API workshop, January 2013

14

Advanced Class Relationships-- Property Restrictions

• Universal quantification: describe class of individuals for which all related individuals must be instances of a given class.• Typon does not have this kind of restriction.

PathoNGenTrace REST API workshop, January 2013

15

Advanced Class Relationships-- Property Restrictions

• Cardinality restrictions: to specify the number of individuals involved in the restriction.

Does Typon has examples of this restriction?

Let’s think about the object property isOfGene.

<owl:Class rdf:about="http://rest.phyloviz.net/ontology#Locus">//. . . <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://rest.phyloviz.net/ontology#isOfGene"/> <owl:onClass rdf:resource="http://rest.phyloviz.net/ontology#Gene"/> <owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1 </owl:qualifiedCardinality> </owl:Restriction> </rdfs:subClassOf></owl:Class>

PathoNGenTrace REST API workshop, January 2013

16

Advanced Use of Properties-- Property Restrictions

• And more…• Disjoint• Reflexive• Irreflexive• Transitive

• Inverse property (inverseOf): one property is obtained by taking another property and changing its direction.

Does Typon has this kind of restriction?• Functional property (FunctionalProperty): every individual can be linked by the property to at most one other individual.

Does Typon has this kind of restriction?• Inverse Functional property (InverseFunctionalProperty): the inverse of the property is also functional

Does Typon has this kind of restriction?• Symmetric property (SymmetricProperty): the property and its inverse coincide .

• Asymetric property (AsymetricProperty): if the property connects entity A with entity B, then it can never connect B with A.

Does Typon has these kind of restrictions?

PathoNGenTrace REST API workshop, January 2013

17

RDF Schema: Language

• Primitives of RDF(S) • Resources:

• rdfs:Class - denotes sets of resources• rdf:Property – the class of resources that links

resources• Properties:

• rdf:type• rdfs:subClassOf • rdfs:subPropertyOf• rdfs:domain • rdfs:range

18

OWL Syntax

PathoNGenTrace REST API workshop, January 2013

• OWL is an extension of RDF - S• OWL primitives are related with RDF-S primitives

• Ex: owl:Class ⊆ rdfs:Class

• Equivalences, disjunctions and classes boolean expressions:• Though specific properties in rdfs:Class ou rdf:Property

(como rdf:subclassOf)• Boolean expressions such as:owl:unionOf, owl:complementOf, owl:intersectionOfElement Equivalence Disjunction

class owl:equivalentClass owl:disjointWith

property owl:equivalentProperty

individual owl:sameAs owl:differentFrom

19

Relating Ontologies

PathoNGenTrace REST API workshop, January 2013

……

……

equivalence

equivalence

partOf

Possibly equivalentImporting other ontologiesfor reusing is a good practice. Since…-> A shared representation is essential for success in communication and interoperability

GeneGeoReference

GeneGeoReference

Gene

GeographicInformation

20

OWL 2 profile

PathoNGenTrace REST API workshop, January 2013

• OWL 2 profiles (commonly called a fragment or a sublanguage in computational logic) is a trimmed down version of OWL 2 that trades some expressive power for the efficiency of reasoning.• OWL 2 EL• OWL 2 QL• OWL 2 RL• OWL 2 DL• OWL 2 Full