Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Web ontology language (owl)

2,601 views

Published on

OWL stands for Web Ontology Language
OWL is built on top of RDF
OWL is for processing information on the web
OWL was designed to be interpreted by computers
OWL was not designed for being read by people
OWL is written in XML
OWL has three sublanguages
- OWL Lite , OWL DL , OWL Full
OWL is a W3C standard

Published in: Technology
  • Never found anything this good explaining Ontology languages. well done. Am in the initial stages of my doctorate research and this was exceptionally helpful
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Web ontology language (owl)

  1. 1. Web Ontology Language (OWL) Prepared by: Ameer Sameer Hamood University of Babylon - Iraq Information Technology - Information Networks
  2. 2. Overview • Introduction to Web Ontology Language (OWL) • Requirements for ontology languages • Three species of OWL • Syntactic forms of OWL • OWL Header • Class elements & Class expressions • Property elements & Property restrictions • Special properties • Boolean combination • Datatypes
  3. 3. Introduction • What You Should Already Know • Before you study OWL you should have a basic understanding of XML, XML Namespaces and RDF. • OWL is Different from RDF • OWL and RDF are much of the same thing, but OWL is a stronger language with greater machine interpretability than RDF. • OWL comes with a larger vocabulary and stronger syntax than RDF. • RDF and RDF schema is limited to binary ground predicate and RDF schema is limited to subclass hierarchy and a property hierarchy with domain and range definition of these properties
  4. 4. Introduction (cont..) • Stack of Languages • XML – Surface syntax, no semantics • XML Schema – Describes structure of XML documents • RDF – Datamodel for relations" between things“ • RDF Schema – RDF Vocabulary Definition Language • OWL – A more expressive Vocabulary Definition Language
  5. 5. Introduction (cont..) Figure 1
  6. 6. Technologies for the Semantic Web Figure 2
  7. 7. What is Ontology? • Ontology is about the exact description of things and their relationships. • For the web, ontology is about the exact description of web information and relationships between web information. Fig1 :Ontology languages in the Semantic Web Architecture Figure 3
  8. 8. Markup ontology languages These languages use a markup scheme to encode knowledge, most commonly with XML. •DARPA Agent Markup Language (DAML+OIL) •Ontology Inference Layer (OIL) •Ontology Web Language (OWL) •Resource Description Framework (RDF) •RDF Schema (RDFS) •Simple HTML Ontology Extensions (SHOE) •Ontology Exchange Language (OXL)
  9. 9. Introduction to Ontology Web Language (OWL) What is OWL? •OWL stands for Web Ontology Language •OWL is built on top of RDF •OWL is for processing information on the web •OWL was designed to be interpreted by computers •OWL was not designed for being read by people •OWL is written in XML •OWL has three sublanguages - OWL Lite , OWL DL , OWL Full •OWL is a W3C standard Lite DL Full
  10. 10. Introduction to Ontology Web Language (cont..) Figure 4
  11. 11. Requirements for ontology languages • Ontology languages allow users to write explicit, formal conceptualizations of domains models. The main requirements are: 1. a well-defined syntax 2. a well-defined semantics 3. efficient reasoning support 4. sufficient expressive power 5. convenience of expression.
  12. 12. Three species of OWL 1- OWL Full: uses all the OWL languages primitives. It also allows to combine these primitives in arbitrary ways with RDF and RDF Schema. OWL Full allows free mixing of OWL with RDF Schema and, like RDF Schema, does not enforce a strict separation of classes, properties, individuals and data values. OWL Full is that it is fully compatible with RDF, both syntactically and semantically. OWL Full the resource owl:Class is equivalent to rdfs:Class. NOTE: RDF documents will generally be in OWL Full, unless they are specifically constructed to be in OWL DL or Lite. OWL Full owl:ObjectProperty is equivalent to rdf:Property.
  13. 13. Three species of OWL (cont ..) 2- OWL DL = Description Logic is a sublanguage of OWL Full which restricts the way in which the constructors from OWL and RDF can be used. OWL DL puts constraints on the mixing with RDF and requires disjointness of classes, properties, individuals and data values. • The advantage of this is that it permits efficient reasoning support. • The disadvantage is that we loose full compatibility with RDF. Most RDF(S) vocabulary cannot be used within OWL DL. • owl:Class is a proper subclass of rdfs:Class (meaning that not all RDF classes are OWL classes in OWL DL and OWL Lite).
  14. 14. Three species of OWL (cont ..) 3- OWL Lite An ever further restriction limits OWL DL to a subset of the language constructors. For example, OWL Lite excludes enumerated classes, disjointness statements and arbitrary cardinality (among others). The advantage of this is a language that is both easier to grasp (for users) and easier to implement (for tool builders). •- The disadvantage is of course a restricted expressivity. OWL Lite forbids the use of: owl:oneOf owl:unionOf owl:complementOf owl:hasValue owl:disjointWith owl:DataRangeFigure 5
  15. 15. Three species of OWL (cont ..) • Subclass relationships between OWL and RDF/RDFS Figure 6
  16. 16. Syntactic forms of OWL • There are different syntactic forms of OWL: 1- RDF’s XML-based syntax (primary syntax for OWL) an XML-based syntax that does not follow the RDF conventions (more easily read by human users) see http://www.w3.org/TR/owl-xmlsyntax/ 2- an abstract syntax (used in the language specification document) (much more compact and readable) see http://www.w3.org/TR/owl-semantics/ 3- a graphic syntax based on the conventions of UML (an easy way for people to become familiar with OWL)
  17. 17. Header • OWL documents are usually called OWL ontologies, and are RDF documents. So the root element of a OWL ontology is an rdf:RDF element which also species a number of namespaces. For example: <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#" xmlns:xsd="http://www.w3.org/2001/XLMSchema#"> This is a conventional OWL declaration, used to introduce the OWL
  18. 18. Header (cont...) • An OWL ontology may start with a collection of assertions for housekeeping purposes. These assertions are grouped under an owl:Ontology element which contains comments, version control and inclusion of other ontologies. For example: <owl:Ontology rdf:about=""> <rdfs:comment>An example OWL ontology</rdfs:comment> <owl:priorVersion rdf:resource="http://www.mydomain.org/uni- ns-old"/> <owl:imports rdf:resource="http://www.mydomain.org/persons"/> <rdfs:label>University Ontology</rdfs:label> </owl:Ontology>
  19. 19. Header Example Figure 7
  20. 20. Class elements • Classes are defined using a owl:Class element For example, we can define a class associateProfessor as follows: <owl:Class rdf:ID="associateProfessor"> <rdfs:subClassOf rdf:resource="#academicStaffMember"/> </owl:Class>
  21. 21. Class elements (cont..) • We can also say that this class is disjoint from the professor and assistantProfessor classes using owl:disjointWith elements. <owl:Class rdf:about="associateProfessor"> <owl:disjointWith rdf:resource="#professor“ /> <owl:disjointWith rdf:resource="#assistantProfessor"/> </owl:Class> Example 2 : <owl:Class rdf:about="#Man"> <owl:disjointWith rdf:resource="#Woman"/>
  22. 22. Class elements (cont..) • Equivalence of classes can be defined using a owl:equivalentClass element: <owl:Class rdf:ID="faculty"> <owl:equivalentClass rdf:resource="#academicStaffMember"/> </owl:Class> Finally, there are two predefiened classes, owl:Thing and owl:Nothing.
  23. 23. Class expressions • A class expression is the name used in this document for either 1- a class name (a URI), or 2- an enumeration, enclosed in <owl:Class>...</owl:Class> tags, or 3- a property-restriction, or 4- a boolean combination of class expressions, enclosed in <rdfs:Class>...</rdfs:Class> tags
  24. 24. Class expressions (cont..) • Enumerations • An enumeration is a owl:oneOf element, containing a list of the objects that are its instances. • For example: <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Eurasia"/> <owl:Thing rdf:about="#Africa"/> <owl:Thing rdf:about="#North_America"/> <owl:Thing rdf:about="#South_America"/> <owl:Thing rdf:about="#Australia"/> <owl:Thing rdf:about="#Antarctica"/> </oneOf>
  25. 25. Class expressions (cont..) instances •Instances of both classes (i.e., objects) and of properties (i.e., pairs) are written in RDF/XML syntax. <Continent rdf:ID="Africa"/> <rdf:Description rdf:ID="Asia"> <rdf:type> <rdfs:Class rdf:about="#Continent"/> </rdf:type> </rdf:Description> <rdf:Description rdf:ID="India"> <isPartOf rdf:resource="#Asia"/> </rdf:Description>
  26. 26. Property elements • In OWL there are two kinds of properties: - Object properties which relate objects to other objects. - Object properties link individuals to individuals. • Examples are isTaughtBy, supervises etc. • - Datatype properties which relate objects to datatype values. • Datatype properties link individuals to data values. Examples are phone, title, age etc. OWL does not have any predefined data types, nor does it provide special definition facilities. Instead it allows one to use XML Schema data types, thus making use of the layered architecture the Semantic Web
  27. 27. Property elements (cont..) • An object property is defined as an instance of the built-in OWL class owl:ObjectProperty. Here is an example of an object property: <owl:ObjectProperty rdf:ID="isTaughtBy"> <owl:domain rdf:resource="#course"/> <owl:range rdf:resource="#academicStaffMember"/> <rdfs:subPropertyOf rdf:resource="#involves"/> </owl:ObjectProperty> Example 2: <owl:ObjectProperty rdf:ID="hasMother"> <rdfs:subPropertyOf rdf:resource="#hasParent"/> </owl:ObjectProperty>
  28. 28. Property elements (cont..) • Here is an example of a datatype property. <owl:DatatypeProperty rdf:ID="age"> <rdfs:range rdf:resource="http://www.w3.org/2001/XLMSchema #nonNegativeInteger"/> </owl:DatatypeProperty>
  29. 29. Property elements (cont..) The following datatypes are recommended for use with OWL: Figure 8
  30. 30. Property restrictions • Property restrictions • A property restriction is a special kind of class description. It describes an anonymous class, namely a class of all individuals that satisfy the restriction. OWL distinguishes two kinds of property restrictions: value constraints and cardinality constraints. • Property restrictions have the following general form: <owl:Restriction> <owl:onProperty rdf:resource="(some property)" /> (precisely one value or cardinality constraint) </owl:Restriction>
  31. 31. Property restrictions (cont..) - A value Constraint 1- owl:allValuesFrom 2- owl:someValuesFrom 3- owl:hasValue - Cardinality Constraint 1- owl:maxCardinality 2- owl:minCardinality 3- owl:cardinality
  32. 32. Property restrictions (cont..) - A value Constraint 1- owl:allValuesFrom A simple example: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> < owl:allValuesFrom rdf:resource="#Human" /> </owl:Restriction>
  33. 33. Property restrictions (cont..) A value Constraint 2- owl:someValuesFrom The following example defines a class of individuals which have at least one parent who is a physician: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:someValuesFrom rdf:resource="#Physician" /> </owl:Restriction>
  34. 34. Property restrictions (cont..) A value Constraint 3- owl:hasValue The following example describes the class of individuals who have the individual referred to as Ameer as their parent: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:hasValue rdf:resource="#Ameer" /> </owl:Restriction>
  35. 35. Property restrictions (cont..) - Cardinality Constraint 1- owl:maxCardinality • The following example describes a class of individuals that have at most two parents: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger"> 2 </owl:maxCardinality> </owl:Restriction>
  36. 36. Property restrictions (cont..) - Cardinality Constraint 2- owl:minCardinality • The following example describes a class of individuals that have at least two parents: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger"> 2 </owl:minCardinality> </owl:Restriction>
  37. 37. Property restrictions (cont..) - Cardinality Constraint 3- owl:cardinality • The following example describes a class of individuals that have exactly two parents: <owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:cardinality rdf:datatype="&xsd;nonNegativeInteger"> 2 </owl:cardinality> </owl:Restriction>
  38. 38. Special properties • Some properties of property elements can be dened directly: • 1-owl:TransitiveProperty • 2- owl:SymmetricProperty • 3- owl:FunctionalProperty • 4- owl:InverseFunctionalProperty
  39. 39. Special properties (cont..) • 1-owl:TransitiveProperty <owl:TransitiveProperty rdf:ID="subRegionOf"> <rdfs:domain rdf:resource="#Region"/> <rdfs:range rdf:resource="#Region"/> </owl:TransitiveProperty>
  40. 40. Special properties (cont..) • 2- owl:SymmetricProperty • A popular example of a symmetric property is the friendOf relation: <owl:SymmetricProperty rdf:ID="friendOf"> <rdfs:domain rdf:resource="#Human"/> <rdfs:range rdf:resource="#Human"/> </owl:SymmetricProperty>
  41. 41. Special properties (cont..) • 3- owl:FunctionalProperty <owl:ObjectProperty rdf:ID="husband"> <rdfs:domain rdf:resource="#Woman" /> <rdfs:range rdf:resource="#Man" /> </owl:ObjectProperty> <owl:FunctionalProperty rdf:about="#husband" />
  42. 42. Special properties (cont..) • 4- owl:InverseFunctionalProperty <owl:InverseFunctionalProperty rdf:ID="biologicalMotherOf"> <rdfs:domain rdf:resource="#Woman"/> <rdfs:range rdf:resource="#Human"/> </owl:InverseFunctionalProperty>
  43. 43. Boolean combination • A boolean combination of class expressions can be constructed from: • 1- owl:intersectionOf element • 2- owl:unionOf element • 3- owl:complementOf element
  44. 44. Boolean combination (cont..) • 1- owl:intersectionOf element <owl:Class rdf:ID="WhiteBurgundy"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Burgundy" /> <owl:Class rdf:about="#WhiteWine" /> </owl:intersectionOf> </owl:Class>
  45. 45. Boolean combination (cont..) • 2- owl:unionOf element <owl:Class rdf:ID="Fruit"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#SweetFruit" /> <owl:Class rdf:about="#NonSweetFruit" /> </owl:unionOf> </owl:Class>
  46. 46. Boolean combination (cont..) • 3- owl:complementOf element <owl:Class rdf:ID="NonConsumableThing"> <owl:complementOf rdf:resource="#ConsumableThing" /> </owl:Class>
  47. 47. Datatypes • Although XML Schema provides a mechanism to construct user-dened datatypes (e.g. the datatype of adultAge as all integers greater than 18, or the datatype of all strings starting with a number), such derived datatypes cannot be used in OWL. In fact, not even all of of the many the built-in XML Schema datatypes can be used in OWL. The OWL reference document lists all the XML Schema datatypes that can be used, but these include the most frequently used types such as string, integer, boolean, time and date.
  48. 48. Versioning information • We have already seen the owl:priorVersion statement as part of the header information to indicate earlier versions of the current ontology. This information has not formal model-theoretic semantics but can be exploited by humans readers and programs alike for the purposes of ontology management. • Besides owl:priorVersion, OWL has three more statements to indicate further informal versioning information. None of these carry any formal meaning. • 1- owl:versionInfostatement • 2- owl:backwardCompatibleWith • 3- owl:incompatibleWith
  49. 49. Diagram Toolbox • OWL Elements: Toolbox Icon Description Ontology The OWL ontology package, which holds all the OWL modeling elements. You can export the contents of this package to produce the Ontology XML document. Class An extended UML Class that represents an OWL Class that describes an instantiable entity with properties and semantic meaning. Data Range An extended UML Enumeration that defines a collection of values for an OWL Property. Enumerated Class An extended UML Class that defines an OWL Class extension defined by any one of the range of the allowed OWL Individuals. Restriction An extended UML Class that defines an OWL Class extension as restricted by the specified property and its allowable values. Singleton An extended UML Class, representing an OWL Class for a specific OWL Individual.
  50. 50. Diagram Toolbox (cont..) OWL Properties (Elements): Toolbox Icon Description Annotation An extended UML Class, representing an OWL Annotation Property definition. Datatype Property An extended UML Class, representing an OWL Datatype Property definition. Object Property An extended UML Class, representing a semantic OWL Property definition. Ontology Property An extended UML Part, representing a property defined on the OWL Ontology. Individual An extended UML Object, representing an instance of an OWL Class which defines an individual fact. Value An extended UML Part, holding a value defined in an OWL Property or OWL Individual.
  51. 51. Diagram Toolbox (cont..) OWL Relationships: Toolbox Icon Description Imports An extended UML PackageImports, that enables an OWL ontology to reference another OWL Ontology. Domain An extended UML Association, that specifies the OWL Classes that apply the specified OWL Property (Annotation, Datatype or Object Property). Range An extended UML Association, that specifies the OWL Class with the value type applicable to the specified OWL Property (Annotation, Datatype or Object Property). Inverse Of An extended UML Association, between two opposing, but related OWL Property elements. Sub Property Of An extended UML Generalization between two OWL Property elements. Subclass Of An extended UML Generalization between two OWL Class elements. Value An extended UML Association, defining an OWL Property and value between OWL
  52. 52. Diagram Toolbox (cont..) OWL Semantics (Relationships): Toolbox Icon Description All Different An extended UML Dependency between different (ie: unique) OWL Individuals typed by the same OWL Class. Backward Compatible With An extended UML Dependency between an OWL Ontology and another that it's backward compatible with. Complement Of An extended UML Dependency between an OWL Class and its complement (or opposite). Different From An extended UML Dependency between two semantically different OWL Individuals typed by the same OWL Class. Disjoint With An extended UML Dependency between two OWL Classes that have no common individuals. Equivalent Class An extended UML Dependency between two equivalent OWL Classes. Equivalent Property An extended UML Dependency between two equivalent OWL Property elements.
  53. 53. Diagram Toolbox (cont..) Toolbox Icon Description Incompatible With An extended UML Dependency between an OWL Ontology and another that it is incompatible with. Intersection Of An extended UML Dependency between an OWL Class and others it also specializes. Ontology Property An extended UML Dependency, representing a property defined on the OWL Ontology. Prior Version An extended UML Dependency between an OWL Ontology and its predecessor. Same As An extended UML Dependency between two semantically identical OWL Individuals typed by the same OWL Class. Union Of An extended UML Dependency between a general OWL Class and others that distinctly specialize it. OWL Semantics (Relationships):
  54. 54. Layering of OWL • Layering of OWL • Now that we have discussed all the language constructors of OWL, we can • completely specify which features of the language can be used in which sub- • language (OWL Full, DL and Lite):
  55. 55. Summary • OWL is the proposed standard for Web ontologies. It allows us to describe • the semantics of knowledge in a machine-accessible way. • OWL builds upon RDF and RDF Schema: (XML-based) RDF syntax is • used; instances are dened using RDF descriptions; and most RDFS modelling primitives are used. • Formal semantics and reasoning support is provided through the mapping of OWL on logics. Predicate logic and description logics have been used for this purpose. While OWL is suciently rich to be used in practice, extensions are in the making. They will provide further logical features, including rules.
  56. 56. Summary Figure 9
  57. 57. https://www.researchgate.net/profile/Ameer_Sameer https://www.linkedin.com/in/ameer-sameer-452693107 https://www.facebook.com/ameer.Mee http://www.slideshare.net/AmeerSameer

×