Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Ontology Language: OWL

Similar presentations


Presentation on theme: "Web Ontology Language: OWL"— Presentation transcript:

1 Web Ontology Language: OWL
A lecture by João Cardoso & Sebastião Freire 11/22/2018 Instituto Superior Técnico

2 Instituto Superior Técnico
Table of Contents Why OWL? The OWL Language Conclusions 11/22/2018 Instituto Superior Técnico

3 Instituto Superior Técnico
Table of Contents Why OWL? Ontological Needs RDF and RDFS vs OWL The OWL Language Conclusions 11/22/2018 Instituto Superior Técnico

4 Ontological Needs > Requirements
Why OWL? (1/7) Ontological Needs > Requirements Ontologies allow the writing of explicit, formal conceptualizations of domains models. Requirements: Well-Defined Syntax Well-Defined Semantics Efficient Reasoning Support Sufficient Expressive Power Convenience of Expression Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

5 Ontological Needs > Reasoning
Why OWL? (2/7) Ontological Needs > Reasoning One use of formal semantics is to allow humans to reason about the knowledge. For ontological knowledge we may reason about: Class membership Equivalence of classes Consistency Classification If x is an instance of a class C, and C is a subclass of D, then we can infer that x is an instance of D. If class A is equivalent to class B, and class B equivalent to class C, then A is equivalent to C, too. Suppose we have declared x to be an instance of the class A. Further suppose that A is a subclass of B, and A and B are declared disjoint. Then we have an inconsistency which points to a probable error in the ontology. If we have declared that certain property-value pairs are sufficient conditions for membership of a class A, then if an individual x satisfies such conditions, then x must be an instance of A. 11/22/2018 Instituto Superior Técnico

6 RDF and RDFS vs OWL > Limitations of RDF & RDFS
Why OWL? (3/7) RDF and RDFS vs OWL > Limitations of RDF & RDFS RDF and RDFS allow the representation of some ontological knowledge. However a number of other features are missing. Such as: Local scope of properties Disjointness of classes Boolean combination of classes Cardinality restrictions Special characteristics of properties 11/22/2018 Instituto Superior Técnico

7 RDF and RDFS vs OWL > Limitations of RDF & RDFS
Why OWL? (4/7) RDF and RDFS vs OWL > Limitations of RDF & RDFS There was a need for an ontology language that was richer than RDF, and surpassed its limitations. Tradeoff between Expressive Power and Efficient Reasoning Support The richer the language, the more inefficient the reasoning support. 11/22/2018 Instituto Superior Técnico

8 RDF and RDFS vs OWL > Web Ontology Language
Why OWL? (5/7) RDF and RDFS vs OWL > Web Ontology Language The solution was the Web Ontology Language (OWL). Why not WOL instead of OWL? Reasons according to Tim Finin: Easier pronunciation Opportunities for Logos Owls & wisdom William A. Martin’s OWL One of the last big projects he led was one to develop OWL, which stood for "One World Language". OWL was a simple KR language (based on semantic networks and frames, I think) intended to be an ontology of concepts which could be used to encode the meaning of almost any natural language text. Tim Finin William A. Martin Tim Finin’s original 11/22/2018 Instituto Superior Técnico

9 RDF and RDFS vs OWL > Web Ontology Language
Why OWL? (6/7) RDF and RDFS vs OWL > Web Ontology Language OWL is built on top of RDF but it’s not a simple extension. OWL was designed to be processed by machines and not people. OWL is a follow up to RDF and RDFS and other ontology language projects (OIL, DAML and DAML+OIL) All its elements are defined as RDF resources and identified by URI’s. Image source: 11/22/2018 Instituto Superior Técnico

10 RDF and RDFS vs OWL > OWL Sublanguages
Why OWL? (7/7) RDF and RDFS vs OWL > OWL Sublanguages OWL is defined by the W3C as three sublanguages. Which are: OWL Full Fully upward compatible with RDF Too powerful for efficient reasoning OWL DL Allows efficient reasoning Not fully compatible with RDF OWL Lite Easier to grasp and implement Restricted expressivity The fact that OWL is built on top of RDF has lead to a set of requirements that may seem incompatible: efficient reasoning support and convenience of expression for a language as powerful as a combination of RDF Schema with a full logic. Image adapted from: 11/22/2018 Instituto Superior Técnico

11 Instituto Superior Técnico
Table of Contents Why OWL? The OWL Language Structure of an OWL Document Header Assertions and imports Classes Properties Instances DataTypes Versioning Information Layering of OWL Conclusions 11/22/2018 Instituto Superior Técnico

12 Structure of an OWL Document
The OWL Language (1/22) Structure of an OWL Document OWL Documents are usually called OWL Ontologies and are RDF documents. OWL Ontologies can be defined in fixe general blocks: Header Assertions Classes Properties Instances 11/22/2018 Instituto Superior Técnico

13 Instituto Superior Técnico
The OWL Language (2/22) Header The root element of an OWL Ontology is an rdf:RDF element which specifies a number of namespaces. <rdf:RDF xmlns:owl =" xmlns:rdf =" xmlns:rdfs=" xmlns:xsd =" 11/22/2018 Instituto Superior Técnico

14 Assertions and imports
The OWL Language (3/22) Assertions and imports The assertions are grouped under an owl:Ontology which contains comments, version control, and inclusion of other ontologies through an owl:imports element. <owl:Ontology rdf:about=""> <rdfs:comment>An example OWL ontology</rdfs:comment> <owl:priorVersion rdf:resource=" <owl:imports rdf:resource=" <rdfs:label>University Ontology</rdfs:label> </owl:Ontology> owl:imports is a transitive property, thus if ontology A imports ontology B, and B imports ontology C, then A will also import C. 11/22/2018 Instituto Superior Técnico

15 Class Elements > Element Definition
The OWL Language (4/22) Class Elements > Element Definition Classes are defined using an owl:Class element, which is a subclass of rdfs:Class. <owl:Class rdf:ID="associateProfessor"> <rdfs:subClassOf rdf:resource="#academicStaffMember"/> </owl:Class> Disjointness can be defined using owl:disjointWith elements. <owl:Class rdf:about="#associateProfessor"> <owl:disjointWith rdf:resource="#professor"/> <owl:disjointWith rdf:resource="#assistantProfessor"/> </owl:Class> Equivalence cab be defined using owl:equivalentClass elements. <owl:Class rdf:ID="faculty"> <owl:equivalentClass rdf:resource="#academicStaffMember"/> </owl:Class> 11/22/2018 Instituto Superior Técnico

16 Class Elements > Thing and Nothing
The OWL Language (5/22) Class Elements > Thing and Nothing There are two predefined classes owl:Thing and owl:Nothing. owl:Thing is a general class containing everything. owl:Nothing is an empty class. Every owl:Class is a SubClassOf owl:Thing and a SuperClass of owl:Nothing. 11/22/2018 Instituto Superior Técnico

17 Properties > Property Elements
The OWL Language (6/22) Properties > Property Elements OWL Ontologies have two distinct types of properties. Relate objects to other objects. <owl:ObjectProperty rdf:ID="isTaughtBy"> <rdfs:domain rdf:resource="#course"/> <rdfs:range rdf:resource="#academicStaffMember"/> <rdfs:subPropertyOf rdf:resource="#involves"/> </owl:ObjectProperty> Relate objects to datatype values. <owl:DatatypeProperty rdf:ID="age"> <rdfs:range rdf:resource=" </owl:DatatypeProperty> 11/22/2018 Instituto Superior Técnico

18 Properties > Property Restrictions
The OWL Language (7/22) Properties > Property Restrictions In OWL Ontologies there are two types of property restrictions: Value Constraints owl:allValuesFrom – Universal quantification specification owl:hasValue – Specific value specification owl:someValuesFrom – Existential quantification specification Cardinality Constraints Put constraints on the range of the property when applied to this particular class description The number of value a property can take 11/22/2018 Instituto Superior Técnico

19 Properties > Value Constraints
The OWL Language (8/22) Properties > Value Constraints owl:allValuesFrom is used to specify the class of possible values the property specified by owl:onProperty can take. <owl:Class rdf:about="#firstYearCourse"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#isTaughtBy"/> <owl:allValuesFrom rdf:resource="#Professor"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> In this exemple it is expressed that the first year course can only be taught by professor. 11/22/2018 Instituto Superior Técnico

20 Properties > Value Constraints
The OWL Language (9/22) Properties > Value Constraints owl:hasValue states a specific value that the property, specified by owl:onProperty must have. <owl:Class rdf:about="#mathCourse"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#isTaughtBy"/> <owl:hasValue rdf:resource="#949352"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> In this example it is expressed that the mathematics courses are taught by staff member with ID 11/22/2018 Instituto Superior Técnico

21 Properties > Value Constraints
The OWL Language (10/22) Properties > Value Constraints owl:someValuesFrom is used to specify the existing values the property specified by owl:onProperty can take. <owl:Class rdf:about="#academicStaffMember"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#teaches"/> <owl:someValuesFrom rdf:resource="#undergraduateCourse"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> In this example it is expressed that each academic staff member must teach at least one undergraduate course. 11/22/2018 Instituto Superior Técnico

22 Properties > Cardinality Constraints
The OWL Language (11/22) Properties > Cardinality Constraints Cardinality restrictions are expressed by owl:minCardinality or owl:maxCardinality. <owl:Class rdf:about="#course"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#isTaughtBy"/> <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger"> 1 </owl:minCardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> Using owl:maxCardinality it is possible to declare an upper limit on the number of class elements. It is possible to specify a precise number. This can be achieved by using the same number in owl:minCardinality and owl:maxCardinality. For convenience, OWL offers also owl:cardinality . In this example it is expressed that every course needs to be taught by at least someone. 11/22/2018 Instituto Superior Técnico

23 Properties > Special Properties
The OWL Language (12/22) Properties > Special Properties owl:TransitiveProperty defines a transitive property. owl:SymmetricProperty defines a symmetric property. owl:FunctionalProperty defines a property that has at most one unique value for each object. owl:InverseFunctionalProperty defines a property for which two different objects cannot have the same value. owl:TransitiveProperty such as “has better grade than”, “is taller than”, “is ancestor of”, etc. owl:SymmetricProperty such as “has same grade as”, “is sibling of”, etc. owl:FunctionalProperty such as “age”, “height”, “directSupervisor”, etc. owl:InverseFunctionalProperty for example the property “isTheSocialSecurityNumberfor” (a social security number is assigned to one person only). <owl:ObjectProperty rdf:ID="hasSameGradeAs"> <rdf:type rdf:resource="&owl;TransitiveProperty" /> <rdf:type rdf:resource="&owl;SymmetricProperty" /> <rdfs:domain rdf:resource="#student" /> <rdfs:range rdf:resource="#student" /> </owl:ObjectProperty> 11/22/2018 Instituto Superior Técnico

24 Properties > Boolean Combinations
The OWL Language (13/22) Properties > Boolean Combinations Owl allows for three types of Boolean combination of classes: Complement (owl:complementOf): <owl:Class rdf:about="#course"> <rdfs:subClassOf> <owl:Restriction> <owl:complementOf rdf:resource="#staffMember"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

25 Properties > Boolean Combinations
The OWL Language (14/22) Properties > Boolean Combinations Owl allows for three types of Boolean combination of classes: Union (owl:unionOf): Note the usage of the attribute rdf:parseType instead of using the explicit syntax for building lists. <owl:Class rdf:ID="peopleAtUni"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#staffMember"/> <owl:Class rdf:about="#student"/> </owl:unionOf> </owl:Class> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

26 Properties > Boolean Combinations
The OWL Language (15/22) Properties > Boolean Combinations Owl allows for three types of Boolean combination of classes: And Intersection(owl:intersectionOf): <owl:Class rdf:ID="facultyInCS"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#faculty"/> <owl:Restriction> <owl:onProperty rdf:resource="#belongsTo"/> <owl:hasValue rdf:resource="#CSDepartment"/> </owl:Restriction> </owl:intersectionOf> </owl:Class> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

27 Properties > Enumerations
The OWL Language (16/22) Properties > Enumerations Enumerations (owl:oneOf) are a way of defining a class by listing all its elements: <owl:Class rdf:ID="daysOfTheWeek"> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="\#Monday"/> <owl:Thing rdf:about="\#Tuesday"/> <owl:Thing rdf:about="\#Wednesday"/> <owl:Thing rdf:about="\#Thursday"/> <owl:Thing rdf:about="\#Friday"/> <owl:Thing rdf:about="\#Saturday"/> <owl:Thing rdf:about="\#Sunday"/> </owl:oneOf> </owl:Class> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

28 Instituto Superior Técnico
The OWL Language (17/22) Instances Instances of classes in OWL are declared as in RDF: However in OWL there is no Unique names assumption therefore two instances are not considered to be different individuals just by having two different names. We need to state explicitly that two individuals are different in order to ensure they are recognized as such, using owl:AllDifferent: <academicStaffMember rdf:ID="949352"> <uni:age rdf:datatype="&xsd;integer"> 39 </uni:age> </academicStaffMember> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

29 Instituto Superior Técnico
The OWL Language (18/22) Instances However in OWL there is no Unique names assumption therefore two instances are not considered to be different individuals just by having two different names. We need to state explicitly that two individuals are different in order to ensure they are recognized as such, using owl:AllDifferent: <owl:AllDifferent> <owl:distinctMembers rdf:parseType="Collection"> <lecturer rdf:about="#949318"/> <lecturer rdf:about="#949352"/> <lecturer rdf:about="949111"/> </owl:distinctMembers> </owl:AllDifferent> Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

30 Instituto Superior Técnico
The OWL Language (19/22) DataTypes In OWL we cannot use the mechanism provided by XML Schema to construct DataTypes. Instead we must use a subset of the DataTypes built-in XML Schema, such as: String; Integer; Boolean; Time; Date; (…) Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

31 Versioning Information
The OWL Language (20/22) Versioning Information OWL has four statements that are used to convey Versioning Information all of which are merely indicative, with no formal meaning: owl:priorVersion is used to indicate previous versions of the current ontology; owl:versionInfo is generally a string containing information about the current version of the ontology; owl:backwardCompatibleWith this generally indicates that the specified ontology has the same intended interpretaions as the new version and owl:incompatibleWith generally indicates that although the current ontology is a more recent version of the specified one, it is not backwards compatible Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

32 Instituto Superior Técnico
The OWL Language (21/22) Layering of OWL As seen before there are three layers to OWL, where in OWL Full we can use every construct in the language, as long as the result is legal RDF. When using OWL DL there are several restrictions: Vocabulary partitioning; Explicit typing: Property separation; No transitive cardinality restrictions; and Restricted anonymous classes. Furthermore, when using OWL Lite we have the following restrictions: Several disallowed constructors (owl:oneOf, owl:disjointWith, owl:unionOf, owl:complementOf and owl:hasValue); Cardinality statements are limited to 0 and 1; owl:equivalentClass statement can no longer be used between anonymous classes. Well-Defined Syntax is necessary for machine-processing of information Formal semantics describes precisely the meaning of knowledge. Can be used for reasoning Efficient Reasoning Support allows to check the consistency of both the ontology and knowledge, check for unintended relationships between classes, and automatically classify instances in classes. 11/22/2018 Instituto Superior Técnico

33 Instituto Superior Técnico
The OWL Language (22/22) Layering of OWL OWL DLP is an unofficial layer of OWL: Less expressive than OWL DL; Guarantees correct interchange between OWL reasoners independent of their CWA and UNA Includes OWL constructors such as: class and property equivalence; equality and inequality between individuals; inverse, transitive, symmetric and functional properties; and class intersection. Does not allow the usage of: Arbitrary cardinality constraints; Intersection constraints. 11/22/2018 Instituto Superior Técnico

34 Instituto Superior Técnico
Table of Contents Why OWL? The OWL Language Conclusions 11/22/2018 Instituto Superior Técnico

35 Instituto Superior Técnico
Conclusions OWL is the proposed standard for web ontologies Describes semantics of knowledge in a way that is acessible to machines. Built upon RDF and RDFS and uses RDF syntax. Formal semantics and reasonng is provided through the mapping of OWL on logics. OWL was sufficiently rich to be used in practice, but extensions were already being planned (OWL 2). 11/22/2018 Instituto Superior Técnico

36 Instituto Superior Técnico
References Antoniou, Grigoris, and Frank Van Harmelen. "Web ontology language: Owl."Handbook on ontologies. Springer Berlin Heidelberg, Grigoris Antoniou, Frank van Harmelen (date). “A Semantic Web Primer”. Retrieved from Amr Ali AL-Hossary. MGED Ontology Presented. Retrieved from 11/22/2018 Instituto Superior Técnico


Download ppt "Web Ontology Language: OWL"

Similar presentations


Ads by Google