Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr. Alexandra I. Cristea OWL.

Similar presentations


Presentation on theme: "Dr. Alexandra I. Cristea OWL."— Presentation transcript:

1 Dr. Alexandra I. Cristea http://www.dcs.warwick.ac.uk/~acristea/ OWL

2 Once upon a time… “Wholly new forms of encyclopedias will appear, ready-made with a mesh of associative trails running through them, ready to be dropped into the memex and there amplified.” Vannevar Bush - As we may Think, July 1945 2

3 Semantic Web I have a dream for the Web [in which computers] become capable of analyzing all the data on the Web – the content, links, and transactions between people and computers. A "Semantic Web", which should make this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The "intelligent agents" people have touted for ages will finally materialize. 3 “a web of data that can be processed directly and indirectly by machines”

4 The SW stack (1.0, by TBL, 2000) 4

5 The SW stack (by Steve Bratt, 2007) 5

6 [W3.org] (reminder) Extensible Markup Language (XML) is a simple, very flexible text format Uniform Resource Identifiers (URIs, aka URLs) are short strings that identify resources in the web The Resource Description Framework (RDF) is a general-purpose language for representing information in the Web. 6

7 [W3.org] RDF Schema, is a semantic extension of RDF. OWL facilitates: – greater machine interpretability of Web content than that supported by XML, RDF, and RDF Schema (RDF-S) –by providing additional vocabulary –along with a formal semantics. 7

8 8 What is OWL? W3C Recommendation, February 2004. –web standard –Newest OWL 2 (W3C Recommendation 11 December 2012) –http://www.w3.org/TR/owl2-overview/http://www.w3.org/TR/owl2-overview/ Web Ontology Language originally built on top of RDF for processing information on the web designed to be interpreted by computers, not for being read by people OWL and a version of OWL2 are written in XML

9 9

10 10 Why OWL? OWL is a part of the "Semantic Web Vision" - a future where: –Web information has exact meaning –Web information can be processed by computers –Computers can integrate information from the web OWL was designed to –provide a common way to process the content of web information (instead of displaying it). –be read by computer applications (instead of humans).

11 11 What is an Ontology? (reminder) formal specification of a certain domain machine manipulable model Ontology is about the exact description of things and their relationships and an inference mechanism for it. For the web, ontology is about –the exact description of web information and –relationships between web information and –reasoning with it. dictionary  taxonomy  ontology

12 12 History of OWL Based on predecessors –(OWL DL = ¼ DAML+OIL) A Web Language: Based on RDF(S) An Ontology Language: Based on logic

13 13 OWL is Different from RDF OWL, RDF similar but OWL –stronger language –greater machine interpretability –larger vocabulary –stronger syntax.

14 14 OWL Sublanguages OWL has three sublanguages: –OWL LiteOWL Lite hierarchy + simple constraints + cardinality {0,1} –OWL DL (includes OWL Lite)OWL DL complete, decidable ( part of FOL; extends ALC) Type separations (class <> property <> individual) OWL DL is the subset of OWL (Full) that is optimized for reasoning and knowledge modeling –OWL Full (includes OWL DL)OWL Full aug. meaning RDF. Classes - individuals

15 OWL2 Profiles OWL 2 EL –Polynomial time algorithms (standard reasoning) –For very large ontologies –Performance important; expressivity less OWL 2 QL –Relat. Db. Queries in LogSpace (SQL) –Lightweight ontologies, many individuals OWL 2 RL –Polynomial time algorithms (rule-extended db. technol.) –Lightweight ontologies; many individuals –Operating directly on RDF All more restrictive than OWL DL 15

16 16

17 17

18 18 OWL can be written in XML By using XML, OWL information can easily be exchanged between different types of computers using different types of operating system and application languages. Oh yes, there is a namespace: xmlns:owl ="http://www.w3.org/2002/07/owl#" Note: OWL2 also written in the Manchester notation

19 19 OWL Use Cases At least two different user groups –OWL used as data exchange language (define interfaces of services and agents) –OWL used for terminologies or knowledge models

20 20 OWL Example (Airport) Example: http://www.cs.man.ac.uk/~rector/Modules/CS646- 2004/Labs/Thursday/Simple_University-01.owl http://www.cs.man.ac.uk/~rector/Modules/CS646- 2004/Labs/Thursday/Simple_University-01.owl OWL Syntax converter: http://mowl-power.cs.man.ac.uk:8080/converter/http://mowl-power.cs.man.ac.uk:8080/converter/ (offline currently) Validators: RDF: http://www.w3.org/RDF/Validator/ (try it out)http://www.w3.org/RDF/Validator/ OWL: http://mowl-power.cs.man.ac.uk:8080/validator/ (offline currently)http://mowl-power.cs.man.ac.uk:8080/validator/ Protégé: http://protege.stanford.edu/products.php#desktop-protege http://protege.stanford.edu/products.php#desktop-protege Semantic web search engine (for more OWL examples): http://swoogle.umbc.edu/ http://swoogle.umbc.edu/

21 21

22 22

23 Relationship OWL 2, OWL 1 OWL 2 has a very similar overall structure to OWL 1. backwards compatibility with OWL 1 is complete. New features with new expressivity: –keys; property chains; richer datatypes, data ranges; qualified cardinality restrictions; –asymmetric, reflexive, and disjoint properties; and –enhanced annotation capabilities –Based on real applications, use cases and user experience 23

24 Modelling Knowledge: basics knowledge representation languageOWL2: knowledge representation language Axioms: statements expressed in OWL ontology Entities: refer to real-world objects Expressions: combinations/ descriptions of entities 24

25 25 OWL Ontologies What’s inside an OWL ontology (entities) –Individuals –Properties (Slots) / values Restrictions on properties (type, cardinality) Characteristics of properties (transitive, …) –Classes + class-hierarchy Relations between classes (inheritance, disjoints, equivalents) –Annotations Reasoning tasks:Reasoning tasks: classification, consistency checking

26 Last time: We revisited: –the SW goals and –the SW stack and its components discussed ontology languages in this context –Reminded ourselves about the ontology definition Started OWL: –why, history, –OWL 1.1 vs. OWL2, –OWL1.1 sub-languages, –OWL2 Profiles, –Use Cases, –An Example, –how OWL 2 models knowledge, –OWL elements 26

27 Now: OWL/XML –Starting with header elements (parts of the universe) See also: http://www.w3.org/TR/2012/REC-owl2- rdf-based-semantics-20121211/ http://www.w3.org/TR/2012/REC-owl2- rdf-based-semantics-20121211/ 27

28 The OWL language There are different syntactic forms of OWL: – RDF/XML syntax see http://www.w3.org/TR/owl2-mapping-to-rdf/ http://www.w3.org/TR/owl2-mapping-to-rdf/ (used for interchange: can be written and read by all conformant OWL 2 software) – OWL/XML syntax that does not follow the RDF conventions (first of the languages) see http://www.w3.org/TR/owl2-xml- serialization/ http://www.w3.org/TR/owl2-xml- serialization/ – functional syntax (used in the language specification document) (much more compact and readable) see http://www.w3.org/TR/owl2-syntax/ http://www.w3.org/TR/owl2-syntax/ – graphic syntax based on the conventions of UML (Unified Modelling Language) (an easy way for people to become familiar with OWL) – Manchester syntax (used in the Protégé editor) see http://www.w3.org/TR/owl2- manchester-syntax/ http://www.w3.org/TR/owl2- manchester-syntax/ 28

29 29

30 30

31 Parts of the Universe (OWL2) individualsrdfs:Resource data values rdfs:Literal ontologiesowl:Ontology classesrdfs:Class datatypesrdfs:Datatype propertiesrdf:Property data properties owl:DatatypeProperty ontology properties owl:OntologyProperty annotation properties owl:AnnotationProperty 31

32 Structure of entities and literals in OWL2 32

33 33 OWL Individuals (e.g., “FourSeasons”) Properties – ObjectProperties (references) – DatatypeProperties (simple values) Classes (e.g., “Hotel”)

34 Individuals 34

35 35 Individuals (Instances) Represent objects in the domain Specific things Two names could represent the same “real-world” individual SydneysOlympicBeach BondiBeach Sydney

36 36 Example of Individuals equivalent to:

37 37

38 38

39 Homework task Identify individuals in an ontology of your choice (either directly in OWL/RDF, or in Protégé) 39

40 Properties Object Properties Datatype Properties 40

41 41 ObjectProperties Link two individuals together Relationships (0..n, n..m) Sydney BondiBeach hasPart FourSeasons hasAccomodation

42 42 Example Property

43 43 Property Domain & Range If a relation is: subject_individual  hasProperty  object_individual The domain is the class of the subject individual The range is the class of the object individual (or a datatype if hasProperty is a Datatype Property) DomainClassRangeClass hasProperty

44 44 Properties, Range and Domain Property characteristics –Domain: “left side of relation” (Destination) –Range: “right side” (Accomodation) Sydney BestWestern FourSeasons hasAccomodation Destination Accomodation hasAccomodation

45 45 Domains Individuals can only take values of properties that have matching domain –“Only Destinations can have Accommodations” Domain can contain multiple classes Domain can be undefined: Property can be used everywhere

46 46 Property Restriction: Example Cardinality owl:Restriction owl:onProperty 1... 1

47 47 OWL Extends Other Ontologies extend existing ontology by saying things about terms in it: Animals have exactly two parents, ie: If x is an animal, it has exactly 2 parents (but NOT anything that has 2 parents is an animal). If ontology is already published, you use the full URL.

48 48

49 49

50 50

51 51

52 52

53 53

54 54

55 55

56 56

57 57 Restrictions (Overview) Define a condition for property values – allValuesFrom – someValuesFrom – hasValue – minCardinality – maxCardinality – cardinality An anonymous class consisting of all individuals that fulfill the condition

58 58 Inverse Properties Represent bidirectional relationships Adding a value to one property also adds a value to the inverse property (!) Sydney BondiBeach hasPart isPartOf

59 59 Inverse Property Example

60 60

61 61 Transitive Properties If A is related to B and B is related to C then A is also related to C Often used for part-of relationships Sydney BondiBeach hasPart NewSouthWales hasPart hasPart (derived)

62 62 Transitive Property Example What can be deduced? < Is this necessary?

63 Previously: –Header of OWL –Individuals in OWL –Properties in OWL: Domain, range, restrictions, inverse, transitive Next: –More on Properties (sub-properties, datatype properties) –Classes 63

64 64 Sub-properties Example... What can we say about some instance that has a hasColor property?

65 Homework task Identify different types of object properties in an ontology of your choice (either directly in OWL/XML, or in Protégé). Find out their type. 65

66 66 DatatypeProperties Link individuals to primitive values (integers, floats, strings, Booleans etc) Often: AnnotationProperties without formal “meaning” in OWL 1.1 Sydney hasSize = 4,500,000 isCapital = true rdfs:comment = “Don’t miss the opera house”

67 67

68 68 XML Schema Datatypes in OWL OWL supports XML Schema primitive datatypes –E.g., integer, real, string, … Strict separation between “object” classes and datatypes –Disjoint interpretation domain for datatypes –Disjoint “object” and datatype properties

69 69 Why Separate Classes and Datatypes? Philosophical reasons: –Datatypes structured by built-in predicates –Not appropriate to form new datatypes using ontology language Practical reasons: –Ontology language remains simple and compact –Semantic integrity of ontology language not compromised –Implementability not compromised — can use hybrid reasoner

70 Homework task Identify datatype properties in an ontology of your choice (either directly in OWL/XML, or in Protégé) 70

71 Classes 71

72 72 Classes Sets of individuals with common characteristics Individuals are instances of at least one class City Sydney Beach Cairns BondiBeach CurrawongBeach

73 Classes are defined using the owl:class element; owl:class is a subclass of rdfs:class 73

74 74 Examples of Classes in OWL

75 Class membership Adam is a Person. Adam Adam is a person. 75

76 76 Superclass Relationships Classes can be organized in a hierarchy Direct instances of subclass are also (indirect) instances of superclasses Cairns Sydney Canberra Coonabarabran

77 77 Example Subclasses … wine vin... What can be said about wine here?

78 78 Class Relationships Classes can overlap arbitrarily City Sydney Cairns BondiBeach RetireeDestination

79 79 Class Disjointness All classes could potentially overlap In many cases we want to make sure they don’t share instances Sydney UrbanAreaRuralArea Sydney Woomera CapeYork disjointWith City Destination

80 80 Example disjoint not in OWL Lite! not in OWL Lite!

81 81 How do we say: Lecturer is disjoint (different) from professor.

82 82 How do we say: Faculty is equivalent with academic staff.

83 83

84 84

85 85

86 86

87 87

88 88 You could also use owl:disjointWith here.

89 89

90 90

91 91

92 92

93 93

94 94

95 95

96 96

97 97

98 98

99 Last time: –Last of OWL properties (sub-properties, datatype properties) –OWL classes: disjoint, union, intersection, equivalence, etc. Next: –revisit reading OWL –OWL2 properties –Visualisation –Final OWL considerations 99

100 100 OWL Syntax What does this mean?

101 101 Class Descriptions Define the “meaning” of classes Anonymous class expressions are used –“All national parks have campgrounds.” –“A backpackers destination is a destination that has budget accommodation and offers sports or adventure activities.” Expressions mostly restrict property values (OWL Restrictions)

102 102 Restrictions (Reminder) Define a condition for property values – allValuesFrom – someValuesFrom – hasValue – minCardinality – maxCardinality – cardinality An anonymous class consisting of all individuals that fulfill the condition

103 Homework task Identify different classes in an ontology of your choice (either directly in OWL/XML, or in Protégé); Identify relations between classes; Identify types of classes (including anonymous classes). 103

104 104

105 105

106 106 (reminder)

107 107

108 108

109 109

110 110

111 111

112 112

113 113

114 114

115 115 and after

116 Visualization of OWL ontologies 116

117 Protégé http://protege.cim3.net/file/pub/ontologie s/travel/travel.owlhttp://protege.cim3.net/file/pub/ontologie s/travel/travel.owl 117

118 118 Visualization with OWLViz

119 Visualization in Ontograf 119

120 120 Tourism Semantic Web (2) OWL Metadata (Individuals) Tourism Ontology Web Services Destination AccommodationActivity

121 121 OWL File & import <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:travel="http://protege.stanford.edu/plugins/ owl/owl-library/travel.owl#" xml:base="http://protege.stanford.edu/plugins/owl/owl- library/heli-bunjee.owl"> [...]

122 122 OWL File: [...] OWL body in RDF wrap <owl:imports rdf:resource="http://protege.stanford.edu/ plugins/owl/owl-library/travel.owl"/> <rdfs:subClassOf rdf:resource="http://protege.stanford. edu/plugins/owl/owl-library/travel.owl#BunjeeJumping"/> [***]

123 123 OWL File [***] in HeliBunjeeJumping [ +++ ] Manic super bunjee now offers nerve wrecking jumps from 300 feet right out of a helicopter. Satisfaction guaranteed.

124 124 OWL File [+++] in travel:hasContact msb@manicsuperbunjee.com Sydney Queen Victoria St 1240

125 125 Problems with RDFS (reminder) RDFS too weak to describe resources in sufficient detail –No localised range and domain constraints Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants –No existence/cardinality constraints Can’t say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents –No transitive, inverse or symmetrical properties Can’t say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical Difficult to provide reasoning support –No “native” reasoners for non-standard semantics –May be possible to reason via FO axiomatisation

126 Homework 126

127 127

128 128 Web Ontology Language Requirements Desirable features identified for Web Ontology Language: Extends existing Web standards –Such as XML, RDF, RDFS Easy to understand and use –Should be based on familiar KR idioms Formally specified Of “adequate” expressive power Possible to provide automated reasoning support

129 129 From RDF to OWL (history) Two languages developed to satisfy above requirements –OIL: developed by group of (largely) European researchers (several from EU OntoKnowledge project) –DAML-ONT: developed by group of (largely) US researchers (in DARPA DAML programme) Efforts merged to produce DAML+OIL –Development was carried out by “Joint EU/US Committee on Agent Markup Languages” –Extends (“DL subset” of) RDF DAML+OIL submitted to W3C as basis for standardisation –Web-Ontology (WebOnt) Working Group formed –WebOnt group developed OWL language based on DAML+OIL –OWL language became thus a W3C Proposed Recommendation

130 130 OWL Language Three species of OWL –OWL full is union of OWL syntax and RDF –OWL DL restricted to FOL fragment (¼ DAML+OIL) –OWL Lite is “easier to implement” subset of OWL DL Semantic layering –OWL DL ¼ OWL full within DL fragment –DL semantics officially definitive OWL DL based on SHIQ Description Logic –In fact it is equivalent to SHOIN (D n ) DL OWL DL Benefits from many years of DL research –Well defined semantics –Formal properties well understood (complexity, decidability) –Known reasoning algorithms –Implemented systems (highly optimised)

131 Thus, OWL DL was used as basis of the OWL2 profiles: –OWL EL, –OWL QL, –OWL RL 131

132 132 OWL Lite Synopsis RDF Schema Features: Class (Thing, Nothing) rdfs:subClassOf rdf:Property rdfs:subPropertyOf rdfs:domain rdfs:range Individual (In)Equality: equivalentClass equivalentProperty sameAs differentFrom AllDifferent distinctMembers Property Characteristics: ObjectProperty DatatypeProperty inverseOf TransitiveProperty SymmetricProperty FunctionalProperty InverseFunctionalProperty Property Restrictions: Restriction onProperty allValuesFrom someValuesFrom Restricted Cardinality: minCardinality (only 0 or 1)minCardinality maxCardinality (only 0 or 1)maxCardinality cardinality (only 0 or 1)cardinality Header Information: Ontology imports Class Intersection: intersectionOf Versioning: versionInfo priorVersion backwardCompatibleW ithbackwardCompatibleW ith incompatibleWith DeprecatedClass DeprecatedProperty Annotation Properties: rdfs:label rdfs:comment rdfs:seeAlso rdfs:isDefinedBy AnnotationProperty OntologyProperty Datatypes xsd datatypes

133 133 OWL DL + Full Class Axioms: oneOf, dataRange disjointWith equivalentClass (applied to class expressions)equivalentClass rdfs:subClassOf (applied to class expressions)rdfs:subClassOf Boolean Combinations of Class Expressions: unionOf complementOf intersectionOf Arbitrary Cardinality: minCardinality maxCardinality cardinality Filler Information: hasValue

134 134 OWL built-in classes owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:SymmetricProperty, owl:TransitiveProperty, owl:DeprecatedClass, owl:DeprecatedProperty

135 135 OWL built in properties owl:equivalentClass, owl:disjointWith, owl:equivalentProperty, owl:inverseOf, owl:sameAs, owl:differentFrom, owl:complementOf, owl:unionOf, owl:intersectionOf, owl:oneOf, owl:allValuesFrom, owl:onProperty, owl:someValuesFrom, owl:hasValue, owl:minCardinality, owl:maxCardinality, owl:cardinality, owl:distinctMembers annotation properties: owl:versionInfo, rdfs:label, rdfs:comment, rdfs:seeAlso, rdfs:isDefinedBy ontology properties: owl:imports, owl:priorVersion, owl:backwardCompatibleWith, owl:incompatibleWith

136 136 OWL query language: OWL-QL OWL Query Language (OWL-QL) is an updated version of the DAML Query Language (DQL).OWL Query Language (OWL-QL) It is intended to be a candidate standard language and protocol for query- answering dialogues among Semantic Web computational agents.

137 137 OWL Class Constructors XMLS datatypes as well as classes in arbitrarily complex nesting of constructors

138 138 OWL Axioms

139 139 OWL Conclusion We have learned: –OWL definition –OWL comparison with RDF –OWL classes and properties –Usage scenarios


Download ppt "Dr. Alexandra I. Cristea OWL."

Similar presentations


Ads by Google