47fef752fb4586f8f8fe670e89b94d39.ppt
- Количество слайдов: 64
Introduction to Web Science Modelling Knowledge Dr Alexiei Dingli 1
Six challenges of the Knowledge Life Cycle • • • Acquire Model Reuse Retrieve Publish Maintain 2
The Semantic Web Shared ontologies help to exchange data and meaning between web-based services 3 (Image by Jim Hendler)
Wine Example Scenario Tell me what wines I should buy to serve with each course of the following menu. Books Agent Wine Agent I recommend Chardonney or Dry. Riesling 4 Grocery Agent
Ontologies in the Semantic Web • Provide shared data structures to exchange information between agents • Can be explicitly used as annotations in web sites • Can be used for knowledge-based services using other web resources • Can help to structure knowledge to build domain models (for other purposes) 5
OWL • Web Ontology Language • Official W 3 C Standard since Feb 2004 • Based on predecessors (DAML+OIL) • A Web Language: Based on RDF(S) • An Ontology Language: Based on logic 6
OWL Ontologies • What’s inside an OWL ontology – Classes + class-hierarchy – Properties (Slots) / values – Relations between classes (inheritance, disjoints, equivalents) – Restrictions on properties (type, cardinality) – Characteristics of properties (transitive, …) – Instances • Reasoning tasks: classification, consistency 7 checking
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 • OWL DL is the subset of OWL (Full) that is optimized for reasoning and knowledge modeling 8
Tutorial Scenario • Semantic Web for Tourism/Traveling • Goal: Find matching holiday destinations for a customer I am looking for a comfortable destination with beach access Tourism Web 9
Scenario Architecture • A search problem: Match customer’s expectations with potential destinations • Required: Web Service that exploits formal information about the available destinations – Accomodation (Hotels, B&B, Camping, . . . ) – Activities (Sightseeing, Sports, . . . ) 10
Tourism Semantic Web • Open World: – New hotels are being added – New activities are offered • Providers publish their services dynamically • Standard format / grounding is needed 11 → Tourism Ontology
Tourism Semantic Web OWL Metadata (Individuals) Tourism Ontology OWL Metadata (Individuals) Destination Activity Accomodation OWL Metadata (Individuals) Web Services 12
OWL (in Protégé) • Instances (e. g. , “Golden Sands”) • Properties – Object. Properties (references) – Datatype. Properties (simple values) • Classes (e. g. , “Hotel”) 13
Instances • Represent objects in the domain • Specific things • Two names could represent the same “real -world” instance Malta Ghajn Tuffieha Golden Bay 14
Object. Properties • Link two individuals together • Relationships (0. . n, n. . m) t Par as Golden Bay h Malta has. Ac como dation Golden Sands 15
Inverse Properties • Represent bidirectional relationships • Adding a value to one property also adds a value to the inverse property t Par has Malta Golden Bay rt. Of is. Pa 16
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 The Maltese Islands has. P art Malta has. P art has. Part (derived) Golden Bay 17
Datatype. Properties • Link individuals to primitive values (integers, floats, strings, booleans etc) Valletta has. Size = 6, 000 is. Capital = true rdfs: comment = “Don’t miss the Cathedral” 18
Classes • Sets of individuals with common characteristics • Individuals are instances of at least one class Beach City Valletta Sliema Golden Bay Paradise Bay 19
Range and Domain • Property characteristics – Domain: “left side of relation” (Destination) – Range: “right side” (Accomodation) Accomodation Destination n ccomodatio has. A Golden Sands has. Accomod Vivaldi Malta ation 20
Domains • Instances can only take values of properties that have matching domain – “Only Destinations can have Accomodations” • Domain can contain multiple classes 21
Superclass Relationships • Classes can be organized in a hierarchy • Direct instances of subclass are also (indirect) instances of superclasses Harbor Area Sliema Valletta 22 Gzira
Class Relationships • Classes can overlap arbitrarily Retiree. Destination City Valletta Sliema Qawra 23
Class Disjointness • All classes could potentially overlap • In many cases we want to make sure they don’t share instances disjoint. With Urban. Area Sydney Valletta City Rural. Area Qawra St Paul’s 24 Destination
(Create a new OWL project) 25
(Create simple classes) 26
(Create class hierarchy and set disjoints) 27
(Create Contact class with datatype properties) 28
(Edit details of datatype properties) 29
(Create an object property has. Contact) 30
(Create an object property with inverse) 31
(Create the remaining classes and properties) 32
Reasoning with Classes • Tool support for three types of reasoning exists: – Consistency checking: Can a class have any instances? – Classification: Is A a subclass of B? – Instance classification: Which classes does an individual belong to? 33
Restrictions (Overview) • Define a condition for property values – all. Values. From – – – some. Values. From has. Value min. Cardinality max. Cardinality cardinality 34
Cardinality Restrictions • Meaning: The property must have at least/at most/exactly x values • is the shortcut for and • Example: A Family. Destination is a Destination that has at least one Accomodation and at least 2 Activities 35
all. Values. From Restrictions • Meaning: All values of the property must be of a certain type • Warning: Also individuals with no values fulfill this condition (trivial satisfaction) • Example: Hiking is a Sport that is only possible in National. Parks 36
some. Values. From Restrictions • Meaning: At least one value of the property must be of a certain type • Others may exist as well • Example: A National. Park is a Rural. Area that has at least one Campground and offers at least one Hiking opportunity 37
has. Value Restrictions • Meaning: At least one of the values of the property is a certain value • Similar to some. Values. From but with Individuals and primitive values • Example: A Part. Of. Sydney is a Destination where one of the values of the is. Part. Of property is Sydney 38
Enumerated Classes • Consist of exactly the listed individuals One. Star. Rating Two. Star. Rating Three. Star. Rating 39 Budget. Accomodation
Logical Class Definitions • Define classes out of other classes – – – union. Of (or) intersection. Of (and) complement. Of (not) • Allow arbitrary nesting of class descriptions (A and (B or C) and not D) 40
union. Of • The class of individuals that belong to class A or class B (or both) • Example: Adventure or Sports activities Adventure Sports 41
intersection. Of • The class of individuals that belong to both class A and class B • Example: A Budget. Hotel. Destination is a destination with accomodation that is a budget accomodation and a hotel Budget. Accomodation Hotel 42
Implicit intersection. Of • When a class is defined by more than one class description, then it consists of the intersection of the descriptions • Example: A luxury hotel is a hotel that is also an accomodation with 3 stars Hotel Accomodation. With 3 Stars 43 Luxury. Hotel
complement. Of • The class of all individuals that do not belong to a certain class • Example: A quiet destination is a destination that is not a family destination Destination Quiet. Destination (grayed) Family. Destination 44
Classification National. Park • A Rural. Area is a Destination • A Campground is Budget. Accomodation • Hiking is a Sport • Therefore: Every National. Park is a Backpackers-Destiantion Backpackers. Destination 45 (Other Backpacker. Destinations)
Classification (2) • Input: Asserted class definitions • Output: Inferred subclass relationships 46
(Create an enumerated class out of individuals) 47
(Create a has. Value restriction) 48
(Create a has. Value restriction) 49
(Classify Campground) 50
(Add restrictions to City and Capital) 51
(Create defined class Backpackers. Destination) 52
(Create defined class Family. Destination) 53
(Create defined class Quiet. Destination) 54
(Create defined class Retiree. Destination) 55
(Classification) 56
(Consistency Checking) 57
Visualization with OWLViz 58
OWL Wizards 59
Putting it All Together • • • Ontology has been developed Published on a dedicated web address Ontology provides standard terminology Other ontologies can extend it Users can instantiate the ontology to provide instances – specific hotels – specific activities 60
Tourism Semantic Web OWL Metadata (Individuals) Tourism Ontology Destination Activity Accomodation Web Services 61
Warning!! The ontology should not contain all the possible information about the domain: you do not need to specialize (or generalize) more than you need for your application (at most one extra level each way) 62
Hint: Steps to create an ontology … 1. Determine the domain and scope of the ontology 2. Defining classes in the ontology 3. Arranging the classes in a taxonomic (subclass–superclass) hierarchy 4. Defining slots and describing allowed values for these slots 5. Creating instances 63
Exercise • Divide class into 2 • Create an ontology representing special occasions … – E. g. wedding, birthday, Christmas, etc • Wins the group that creates the most complete ontology 64
47fef752fb4586f8f8fe670e89b94d39.ppt