owl web ontology language
DESCRIPTION
OWL Web Ontology Language. The Knowledge Presentation Language. Web Ontology Language (OWL ). - PowerPoint PPT PresentationTRANSCRIPT
The Knowledge Presentation Language
Web Ontology Language (OWL)Web Ontology Language (OWL) extends RDF
and RDFS languages by adding several other constructs such as owl:class (in addition to the rdfs:class), relationships between class and individuals, and property characteristics These new constructs facilitate
interoperability among distributed resources OWL is encoded in RDF/XML
OWL is said to be ‘monotonic’, meaning that addition of new information to a knowledge base does not falsify previous conclusions
Owl dialects OWL has three species (dialects):
OWL-Lite, OWL DL, and OWL Full
The differences are on the limitations on restrictions on classes
OWL Lite: supports class and property hierarchies and simple restrictions, allowing us to develop thesauri and simple ontologies
OWL DL is the decidable version of OWL Full, with some limitation; it is a restricted version of RDF
OWL Full has no limitation, but may not be decidable
Features of OWLIs compatible with (serializable in) XML. Uses XSD
datatypes
Follows description logic in having class, property, and individuals
Has constructs that are identified by the URIref
Allow us to define complex classes with Boolean combinations (intersection, union, complement)
Makes it possible to define properties and subproperties and assigning logical metadata (e.g., transitivity)
Has features to set two classes, properties, and individuals as equivalent
…Allows setting the cardinality constraints
Setting classes as instances
Resources defined by it can have labels such that they can be displayed in different natural languages
Allows developing Web-distributed ontologies
Lets us import and reuse other owl code (ontologies) by extension
Allows saving the same ontologies with different versions
Allows defining metadata for ontologies (e.g., author, version)
OWL ontology header infoIncludes namespace declarationInformation about the ontology is put within the
owl:Ontology Qname, e.g., version, comments, and import
The version includes: owl:versionInfo, owl:priorVersion, owl:backwardCompatibleWith, owl:incompatibleWith, owl.deprecatedClass, and owl:deprecatedProperty
We can also use the rdfs:comment, rdfs:label, rdfs:seeAlso, and rdfs:isDefinedBy
<rdf:Description rdf:about="http://www.Tectonics.org"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/> </rdf:type></rdf:Description>
<rdf:Description rdf:about="http://www.StructuralGeology.org"> <rdf:type>
<rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/> </rdf:type>
<rdfs:comment>Part of Structural Geology</rdfs:comment>
<rdfs:label>Structural Geology</rdfs:label>
<owl:imports><rdf:Description rdf:resource="http://www.Tectonics.org"/>
</owl:imports>
<owl:priorVersion><rdf:Description rdf:resource="http://www.StructuralGeology.org/v0"/>
</owl:priorVersion> </rdf:Description>
Two Types of Property in OWL Datatype Property has a typed literal (e.g., XSD or
RDF literal) as its range
As a binary relation, the datatype property relates a set of instances of a [domain] class to a set of instances of a datatype (range; object)
A datatype property is declared using the owl:DatatypeProperty
<length rdf:type owl:DatatypeProperty> Or:<owl:datatypeProperty rdf:about=“length”/>
Object Property Object property has a URIref as its range
As a binary property, it relates a set of individuals of one class to the set of individuals of another class
That is, the subject and objects of a triple using an object property are both individuals
Object properties are declared in two different ways:
<analyze rdf:type owl:ObjectProperty> or:<owl:ObjectProperty rdf:about=“analyze”/>
Example in N3struc:foldDescription rdf:type owl:DatatypeProperty.
struc:foldDescription rdfs:domain struc:Fold.
struc:foldDescription rdfs:range xsd:string.
struc: Fold struc: foldDescriptionxsd:string.
struc:foldAxis rdf:type owl:ObjectProperty.
struc:foldAxis rdfs:domainstruc:Fold.
struc:foldAxis rdfs:range struc:Line.
struc:Fold struc:foldAxis struc:Line.
Domain and range of properties Can be assigned in a short form:<owl:objectProperty rdf:about=“infiltrate”/>
<rdfs:domain rdf:resource=“SurfaceWater”/>
<rdfs:range rdf:resource=“Aquifer”/>
</owl:objectProperty>
Or the long way, as is shown in the following slide!
<rdf:Description rdf:about=":infiltrate“>
<rdf:type>
<rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</rdf:type>
<rdfs:domain><rdf:Description rdf:resource=":SurfaceWater"/></rdfs:domain>
<rdfs:range><rdf:Description rdf:resource=":Aquifer"/></rdfs:range>
</rdf:Description>
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF 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#"> <rdf:Description rdf:about=":length"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":Fault"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource="http://www.w3.org/2001/XMLSchema#string"/></rdfs:range> </rdf:Description> <rdf:Description rdf:about=":infiltrate"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":SurfaceWater"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource=":Aquifer"/></rdfs:range> </rdf:Description>
<rdf:Description rdf:about=":Fault"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
<rdf:Description rdf:about=":SurfaceWater"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
<rdf:Description rdf:about=":Aquifer"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
</rdf:RDF>
owl:inveseOf Properties themselves have properties
owl:inverseOf property relates two properties to each other
Many properties in one direction have an inverse property in the opposite direction
For example, the first property in each of the following pairs reverses the direction of the second property
‘analyzes’ and ‘analyzedBy’ ‘investigates’ and ‘investigatedBy’ ‘hasSample’ and ‘sampleOf ‘wrote’ and ‘writtenBy’ ‘locatedIn’ and ‘locationOf’
These follow the definition of the mathematical inverse function that state: if f(x) = y, then f-1(y) = x.
Inference of the owl:inverseOfP owl:inverseOf Q.Ifx P y.Theny Q x.
Example: The partOf property is an inverse property
struc : Fold hasPart struc : limb.partOf owl : inveseOf struc : hasPart.
This means that if fold has limb as part, then limb is part of fold
Fold Limb
x y
hasPart
partOfQ
P
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF 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#"> <rdf:Description rdf:about=":Fold"><rdf:type> <rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
<rdf:Description rdf:about=":Limb"><rdf:type> <rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
<rdf:Description rdf:about=":partOf"><rdf:type> <rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":Limb"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource=":Fold"/></rdfs:range> <owl:inverseOf><rdf:Description rdf:resource=":hasPart"/></owl:inverseOf> </rdf:Description>
<rdf:Description rdf:about=":hasPart"> <rdf:type> <rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> </rdf:type> </rdf:Description></rdf:RDF>
Fold Limbx y
hasPart
partOf
partOf owl:inverseOf hasPart
owl:symmetricProperty If the property that relates two classes is the
same (has the same name) in both directions, we declare the property as symmetric
For example: ‘equals’ or ‘siblingOf’ is a symmetric property
if x is siblingOf y, then y is siblingOf x
Symmetric properties must be declared as such P rdf : type owl:SymmetricProperty.
The inference for a symmetric property is as follows:P owl:inverseOf P.
That is, the symmetric property is an inverse property.
owl:transitiveProperty In mathematics, a relation is said to be
transitive if P(a,b) and P(b,c) implies P(a,c). This is represented by the owl:TransitiveProperty, which applies to a property.
P rdf : type owl:TransitiveProperty. The inference for this property is as follows:IF
x P y.
y P z.
THEN x P z.
C part of B B part of A C part of A.
ABC
FaultBend FaultSegmentx y
PFault
z
P
partOf The partOf property (containment) may be transitive
(not always). Finger is part of hand, and hand is part of body
However, someone’s hand is not part of the group to which the person is part of
Geologically, being fractal, faults have segments that have smaller fault segments, which have even smaller segments which are themselves fault
struc:FaultSegment struc:partOf struc: FaultSegment.struc:partOf rdf :type owl:TransitiveProperty.struc:FaultSegment rdfs:subClassOf struc:Fault.
FaultBend FaultSegmentx y
partOfFault
z
partOf
Transitive partOfpartOf owl:inverseOf hasPart
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF 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#"> <rdf:Description rdf:about=":Fault"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description>
<rdf:Description rdf:about=":FaultSegment“> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description> <rdf:Description rdf:about=":partOf"><rdf:type> <rdf:Description rdf:about="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":FaultSegment"/></rdfs:domain> <rdfs:domain><rdf:Description rdf:resource=":FaultBend"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource=":Fault"/></rdfs:range> </rdf:Description> <rdf:Description rdf:about=":FaultBend"><rdf:type> <rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type> </rdf:Description> <rdf:Description rdf:about=":hasPart"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":Fault"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource=":FaultSegment"/></rdfs:range> <owl:inverseOf><rdf:Description rdf:resource=":partOf"/></owl:inverseOf> </rdf:Description></rdf:RDF>
locatedIn is transitive
C locatedIn B B locatedIn A C locatedIn A. geo:locatedIn rdf:type owl:TransitiveProperty. If
tect:SanAndreasFault geo:locatedIn geo:California.geo:California geo:locatedIn geo:United States.
Thengeo:SanAndreasFault geo:locatedIn geo:United States.
ABC
Functional Property …A functional property is a property that can have
only one unique value y (object) for each instance x (subject)
e.g., hasBirthMother is functional This means that there cannot be two distinct values y1 and y2 if
(x, y1) and (x, y2) are instances of the functional property
If x p y1 and x p y2, then y1=y2
Ashley hasBirthMother Jane
Ashley hasBirthMother Maria then jane=MariaGiven x (subject individual) we can find y (object individual)!Both object and datatype properties can be declared
functional!There could be many x’s, but all relate to one y
Example: husband property may be functional in some cultures: Woman husband Man(not in polygamy or same sex marriages)
If x husband y1 and x husband y2, then y1=y2
If Jane husband Jack and Jane husband Jeff, then Jack = Jeff
y2x
y1p
p
x
xy
xx
x
Inference The owl:FunctionalProperty can only take one value for
any [object] individual, allowing sameness to be inferred
The inference rule for this construct is as follows Note: x is a subject individual and A and B are object
individuals
IfP rdf:type owl:FunctionalProperty.
X P A
X P B
Then
A owl:sameAs B.
x Ap
Bp
x
A property p is functional if x p y1 and x p y2 imply that y1 = y2
We infer that the two object individuals are the same (y1 owl:sameAs y2)
Note that the subjects are not asserted to be the same; only the objects are the same
DaughterProduct daughterProductOf ParentIsotopeSample sampleLocation LocationdaughterProductOf and sampleLocation are functional properties, because there is one unique value y for x in the following triples:
x sampleLocation y or x daughterProductOf yThere is a unique location for each sampleThere is a unique ParentIsotope for each daughterProduct
ParentIsotope
DaughterProduc
t
daughterProductOf
LocationSamplesampleLocation
Geological Example
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF 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#"> <rdf:Description rdf:about=":Sample"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/> </rdf:type></rdf:Description> <rdf:Description rdf:about=":Location"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/> </rdf:type> </rdf:Description> <rdf:Description rdf:about=":sampleLocation"> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/></rdf:type> <rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/></rdf:type> <rdfs:domain><rdf:Description rdf:resource=":Sample"/></rdfs:domain> <rdfs:range><rdf:Description rdf:resource=":Location"/></rdfs:range> </rdf:Description>
</rdf:RDF>
Sample LocationsampleLocation
Inverse Functional PropertyThis is the inverse property of the functional property.e.g., isBirthMotherOf which is the inverse of
hasBirthMoterhThe object y of an inverse functional property p uniquely
determines the subject x (some individual)y can only be the value for p for a single instance xThere cannot be two distinct x1 and x2 such that (x1, y)
and (x2, y) are instances of p.
If there are, then x1 = x2
Liz isBirthMotherOf Steven
Myra isBirthMotherOf Steven then, Liz = Myra (same individual)
Note: People’s name is not inverse functional (different people can have the same name)
x1
y
p
px2 Steven
Liz
Myra
isBirthMotherOf
isBirthMotherOf
Inverse Functional Property This property is the inverse of the owl:FunctionalProperty It is very useful for merging data from different sources The owl:FunctionalProperty and owl:InverseFunctionalProperty
allow merging data for a same individual from different sources
The owl:InverseFunctionalProperty is equivalent to the key in relational databases, such as SSN and driving license number
These are unique The inference rule of this construct is as follows:P rdf:type owl:InverseFunctionalProperty.
A P X.
B P X.
Then
A owl:sameAs B.
A
x
p
pB
owl:InverseFunctionalPropertyIf x p y, and p is inverse functional, then there can be only a
single value of x for a given y, that is:The object individual y of an
owl:InverseFunctionalProperty p uniquely determines a single subject individual x
Given the object individual (y), we can find a unique subject individual (x) (i.e., x y-1)
In this case, if x1 p y and x2 p y, then x1 and x2 are the same! If x1 ssn 123445555 and x2 ssn 123445555, then x1=x2e.g., hasSingleAuthorArticle: a person (subject) may have
many published papers (objects), but all are authored by one author (subject).
Person hasSingleAuthorArticle SingleAuthorArticleGiven a singleAuthorArticle object individual (y) we can find a
unique subject individual (x)
yy
yx
…
A single value of the property (object y, e.g., doi of an Article) cannot be shared by two x subject entities (e.g., Authors).
Example:Let’s assume that an isotope is produced by the decay
of some unique isotope (may not be true in all cases!)
Isotope parentOf DaughterIsotope
An object individual y (some daughterIsotope) uniquely determines a single subject individual x (parent isotope)
Author ArticlehasSingleAuthorPaper
yx
Example
Let’s assume location of any measurement is uniquely identified by the longitude and latitude (defined by the Location class), i.e., assume no two samples of a rock can be taken at the same exact spot
:Station134 : locatedAt : LocationA.
:Station346 : locatedAt : LocationA.
We infer that:Station134 owl:sameAs :Station346
Station LocationlocatedAt
One-to-one Property For a one-to-one relationship, we use a combination of
the owl:FunctionalProperty and owl:inverseFunctionalProperty.
Note: Sample sampleId XSD:Integer is not a good example, because it is a datatype property, and not every number gives you the sample
:hasimage rdfs:domain :ThinSection.
:hasImage rdfs:range Image.
:hasImage rdf:type owl:FunctionalProperty.
:hasImage rdf:type owl:InverseFunctionalProperty.
So, any two thin sections with the same image must be
the same thin section!
Sample XSD:IntegersampleId
x y
X
ThinSection ImagehasImage
One-to-one hasImage Property
<rdf:Description rdf:about=":hasImage">
<rdf:type>
<rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</rdf:type>
<rdf:type>
<rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</rdf:type>
<rdf:type>
<rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
</rdf:type>
<rdfs:domain><rdf:Description rdf:resource=":ThinSection"/></rdfs:domain>
<rdfs:range><rdf:Description rdf:resource=":Image"/></rdfs:range>
</rdf:Description>
<rdf:Description rdf:about=":ThinSection">
<rdf:type><rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type>
</rdf:Description>
<rdf:Description rdf:about=":Image">
<rdf:type>rdf:Description rdf:resource="http://www.w3.org/2002/07/owl#Class"/></rdf:type>
</rdf:Description>
</rdf:RDF>ThinSection ImagehasImage
Note that not every functional property can also be an inverse functional property
For example, mineral composition can be functional only, because every mineral has a unique composition, but many individual minerals can share that same composition (if they belong to the same class) (compare with hasFather)
Every individual child has one biological father, but the father can have more than one child
Some properties can only be inverse functional, but not functional
For example, a single-author publication of an author (or description of an outcrop or a thin section by one person) may be inverse functional, because it only belongs to one person◦ The person can have several such publications or
descriptions
Mineral CompositionhasComposition
x1 x2