Semantic Web
description
Transcript of Semantic Web
![Page 1: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/1.jpg)
Semantic WebSemantic Web
Andrejs LesovskisAndrejs Lesovskis
![Page 2: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/2.jpg)
Semantic Web layers
![Page 3: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/3.jpg)
Ontology spectrum (1)
Weak semanticsWeak semantics
Strong semanticsStrong semanticsIs Disjoint Subclass of with transitivity property
Modal Logic
Logical theory
Thesaurus Has narrower meaning than
Taxonomy Is sublassification of
Conceptual model Is subclass of
DB Schemas, XML Schema
UML
First Order Logic
RelationalModel, XML
ER
Extended ER
Description LogicDAML+OIL, OWL
RDF/SXTM
Syntactic Interoperability
Structural Interoperability
Semantic Interoperability
From
less
to m
ore
expre
ssiv
e
![Page 4: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/4.jpg)
Ontology spectrum (2)
Weak semanticsWeak semantics
Strong semanticsStrong semanticsIs Disjoint Subclass of with transitivity property
Modal Logic
Logical theory
Thesaurus Has narrower meaning than
Taxonomy Is sublassification of
Conceptual model Is subclass of
DB Schemas, XML Schema
UML
First Order Logic
RelationalModel, XML
ER
Extended ER
Description LogicDAML+OIL, OWL
RDF/SXTM
Syntactic Interoperability
Structural Interoperability
Semantic Interoperability
From
less
to m
ore
expre
ssiv
e
Problem: Very GeneralSemantic Expressivity: Very High
Problem: Local Semantic Expressivity: Low
Problem: GeneralSemantic Expressivity: Medium
Problem: GeneralSemantic Expressivity: High
![Page 5: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/5.jpg)
Open and Closed World Assumptions
The Closed World Assumption (CWA) is the assumption that what is not known to be true must be false.Imagine, we have the following statement "Peteris is a citizen of Latvia." and we are asked "Is Peteris a citizen of Lithuania? ", under the CWA, the answer is no.
![Page 6: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/6.jpg)
Open and Closed World AssumptionsThe Open World Assumption (OWA) is
the opposite. In other words, it is the assumption that what is not known to be true is simply unknown.Under the OWA, the answer to the question about Peteris is "I don’t know".The Web is a system with incomplete information. Absence of information on the Web means that the information has not been made explicit. Therefore, Semantic Web uses the Open World Assumption.
![Page 7: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/7.jpg)
Protégé OWL Plugin
Extension of Protégé for handling OWL ontologies.Project started in April 2003.Features:
Loading and saving OWL files and databases;Graphical editors for class expressions;Access to description logics reasoners;Powerful platform for hooking in custom-tailored components.
![Page 8: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/8.jpg)
OWL Plugin Architecture
Protégé API(Classes, properties,
individuals, etc.)
Protégé GUI(Tabs, Widgets, Menus)
DBStorage P
roté
gé C
ore
Sys
tem
Protégé OWL API(Logical class definitions,
restrictions, etc.)
Protégé OWL GUI(Expression Editor,
Conditions Widget, etc.)
OWL FileStorage
Jena API(Parsing, Reasoning)
OW
L P
lugi
n
OWL Extension APIs(SWRL, OWL-S, etc.)
OWL GUI Plugins(SWRL Editors, ezOWL,OWLViz, Wizards, etc.)
![Page 9: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/9.jpg)
Tutorial Scenario
Semantic Web for Tourism/Traveling domain
Goal: Find matching holiday destinations for a customer
I am looking for a comfortable
destination with beach access
Tourism Web
![Page 10: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/10.jpg)
Scenario description
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, ...),
etc.
![Page 11: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/11.jpg)
Semantic Web for tourism domain
Open World:
New hotels are being added,
New activities are offered.
Providers publish their services dynamically.
Standard format / grounding is needed → Tourism Ontology.
![Page 12: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/12.jpg)
Tourism Semantic Web
OWLMetadata
(Individuals)Tourism Ontology
Web Services
Destination
AccomodationActivityOWL
Metadata(Individuals)
OWLMetadata
(Individuals)
OWLMetadata
(Individuals)
![Page 13: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/13.jpg)
Individuals
Represent objects in the domain.
Specific things.
Two names (synonyms) could represent the same “real-world” individual.
SydneysOlympicBeachBondiBeach
Sydney
![Page 14: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/14.jpg)
ObjectProperties
Link two individuals together using
particular relationships (0..n, n..m).
Sydney
BondiBeachhasPart
FourSeasonshasAccomodation
![Page 15: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/15.jpg)
Inverse Properties
Represent bidirectional relationships.
Adding a value to one property also adds a value to the inverse property.
Sydney
BondiBeachhasPart
isPartOf
![Page 16: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/16.jpg)
DatatypeProperties
Link individuals to primitive values(integers, floats, strings, booleans, etc).
Often: AnnotationProperties without formal “meaning”.
Sydney
hasSize = 4,500,000isCapital = truerdfs:comment = “Don’t miss the opera house”
![Page 17: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/17.jpg)
ClassesSets of individuals with common characteristics.
Individuals are instances of at least one class (OWL supports multiple inheritance).
City
Sydney
Beach
Cairns
BondiBeach
CurrawongBeach
![Page 18: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/18.jpg)
Range and Domain
Property characteristics
Domain: “left side of relation” (Destination);
Range: “right side” (Accomodation).
Sydney
BestWestern
FourSeasonshasAccomodation
DestinationAccomodation
hasAccomodation
![Page 19: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/19.jpg)
Domains
Individuals can only take values of properties that have matching domain:
“Only Destinations can have Accomodations”.
Domain can contain multiple classes.
Domain can be undefined:Property can be used everywhere.
![Page 20: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/20.jpg)
Superclass Relationships
Classes can be organized in a hierarchy.
Direct instances of subclass are also (indirect) instances of superclasses.
Cairns
Sydney
Canberra
Coonabarabran
![Page 21: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/21.jpg)
Class Relationships
Classes can overlap arbitrarily.
City
Sydney
CairnsBondiBeach
RetireeDestination
![Page 22: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/22.jpg)
Class Disjointness
All classes could potentially overlap.
In many cases we want to make sure they don’t share instances.
Sydney
UrbanArea RuralArea
SydneyWoomera
CapeYork
disjointWith
CityDestination
![Page 23: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/23.jpg)
(Create a new OWL project)
![Page 24: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/24.jpg)
(Create simple classes)
![Page 25: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/25.jpg)
(Create class hierarchy and set disjoints)
![Page 26: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/26.jpg)
(Create Contact class with datatype properties)
![Page 27: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/27.jpg)
(Edit details of datatype properties)
![Page 28: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/28.jpg)
(Create an object property hasContact)
![Page 29: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/29.jpg)
(Create an object property with inverse)
![Page 30: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/30.jpg)
(Create the remaining classes and properties)
![Page 31: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/31.jpg)
Class DescriptionsClasses can be described by their logical characteristics.
Descriptions are “anonymous classes”.
Things with three star accomodation
Things with sightseeing opportunities
RetireeDestination
SydneySanJose
BlueMountains
![Page 32: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/32.jpg)
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 accomodation and offers sports or adventure activities.”
Expressions mostly restrict property values (OWL Restrictions).
![Page 33: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/33.jpg)
Class Descriptions: Why?
Based on OWL’s Description Logic support.
Formalize intentions and modeling decisions (comparable to test cases).
Make sure that individuals fulfill conditions.
Tool-supported reasoning.
![Page 34: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/34.jpg)
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?
![Page 35: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/35.jpg)
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
![Page 36: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/36.jpg)
Cardinality Restrictions
Meaning: The property must have at least/at most/exactly x values
is the shortcut for and
Example: A FamilyDestination is a Destination that has at least one Accomodation and at least 2 Activities
![Page 37: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/37.jpg)
allValuesFrom 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 NationalParks.
![Page 38: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/38.jpg)
someValuesFrom Restrictions
Meaning: At least one value of the property must be of a certain type.
Others may exist as well.
Example: A NationalPark is a RuralArea that has at least one Campground and offers at least one Hiking opportunity.
![Page 39: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/39.jpg)
hasValue RestrictionsMeaning: At least one of the values of the property is a certain value.
Similar to someValuesFrom but with Individuals and primitive values.
Example: A PartOfSydney is a Destination where one of the values of the isPartOf property is Sydney.
![Page 40: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/40.jpg)
Enumerated Classes
Consist of exactly the listed individuals.
OneStarRating
TwoStarRatingThreeStarRating
BudgetAccomodation
![Page 41: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/41.jpg)
Logical Class Definitions
Define classes out of other classes
unionOf (or)
intersectionOf (and)
complementOf (not)
Allow arbitrary nesting of class descriptions (A and (B or C) and not D)
![Page 42: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/42.jpg)
unionOfThe class of individuals that belong to class A or class B (or both)
Example: Adventure or Sports activities Adventure Sports
![Page 43: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/43.jpg)
intersectionOfThe class of individuals that belong to both class A and class B.
Example: A BudgetHotelDestination is a destination with accomodation that is a budget accomodation and a hotel.
BudgetAccomodation
Hotel
![Page 44: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/44.jpg)
Implicit intersectionOfWhen 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 accommodation with 3 stars.AccommodationWith3StarsHotel
LuxuryHotel
![Page 45: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/45.jpg)
complementOfThe 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
DestinationFamilyDestination
QuietDestination (grayed)
![Page 46: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/46.jpg)
Class Conditions
Necessary Conditions:(Primitive / partial classes)“If we know that something is a X,then it must fulfill the conditions...”
Necessary & Sufficient Conditions:(Defined / complete classes)“If something fulfills the conditions...,then it is an X.”
![Page 47: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/47.jpg)
Class Conditions (2)
QuietDestination
NationalPark
(not everything that fulfills theseconditions is a NationalPark)
(everything that fulfills theseconditions is a QuietDestination)
![Page 48: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/48.jpg)
Classification
NationalPark
BackpackersDestination
A RuralArea is a Destination
A Campground is BudgetAccomodation
Hiking is a Sport
Therefore:Every NationalPark is a Backpackers-Destiantion
(Other BackpackerDestinations)
![Page 49: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/49.jpg)
Classification (2)
Input: Asserted class definitions.
Output: Inferred subclass relationships.
![Page 50: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/50.jpg)
(Create an enumerated class out of individuals)
![Page 51: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/51.jpg)
(Create a hasValue restriction)
![Page 52: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/52.jpg)
(Create a hasValue restriction)
![Page 53: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/53.jpg)
(Create a defined class)
![Page 54: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/54.jpg)
(Classify Campground)
![Page 55: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/55.jpg)
(Add restrictions to City and Capital)
![Page 56: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/56.jpg)
(Create defined class BackpackersDestination)
![Page 57: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/57.jpg)
(Create defined class FamilyDestination)
![Page 58: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/58.jpg)
(Create defined class QuietDestination)
![Page 59: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/59.jpg)
(Create defined class RetireeDestination)
![Page 60: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/60.jpg)
(Classification)
![Page 61: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/61.jpg)
(Consistency Checking)
![Page 62: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/62.jpg)
Visualization with OWLViz
![Page 63: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/63.jpg)
OWL Wizards
![Page 64: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/64.jpg)
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.
![Page 65: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/65.jpg)
Ontology Import
Adds all classes, properties and individuals from an external OWL ontology into your project.
Allows to create individuals, subclasses, or to further restrict imported classes.
Can be used to instantiate an ontology for the Semantic Web.
![Page 66: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/66.jpg)
Tourism Semantic Web (2)
OWLMetadata
(Individuals)
Tourism Ontology
Web Services
Destination
AccomodationActivity
![Page 67: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/67.jpg)
Ontology Import with ProtégéOn the Metadata tab:
Add namespace, define prefixCheck “Imported” and reload your project
![Page 68: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/68.jpg)
Individuals
![Page 69: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/69.jpg)
Individuals
![Page 70: Semantic Web](https://reader036.fdocuments.us/reader036/viewer/2022062410/568159c4550346895dc71621/html5/thumbnails/70.jpg)
OWL File<?xml version="1.0"?>\<rdf:RDF xmlns="http://protege.stanford.edu/plugins/owl/owl-library/heli-bunjee.owl#" 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">
<owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl"/> </owl:Ontology>
<owl:Class rdf:ID="HeliBunjeeJumping"> <rdfs:subClassOf rdf:resource="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#BunjeeJumping"/> </owl:Class>
<HeliBunjeeJumping rdf:ID="ManicSuperBunjee"> <travel:isPossibleIn> <rdf:Description rdf:about="http://protege.stanford.edu/plugins/owl/owl-library/travel.owl#Sydney"> <travel:hasActivity rdf:resource="#ManicSuperBunjee"/> </rdf:Description> </travel:isPossibleIn> <travel:hasContact> <travel:Contact rdf:ID="MSBInc"> <travel:hasEmail rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[email protected] </travel:hasEmail> <travel:hasCity rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sydney</travel:hasCity> <travel:hasStreet rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Queen Victoria St</travel:hasStreet> <travel:hasZipCode rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1240</travel:hasZipCode> </travel:Contact> </travel:hasContact> <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Manic super bunjee now offers nerve wrecking jumps from 300 feet right out of a helicopter. Satisfaction guaranteed.</rdfs:comment> </HeliBunjeeJumping>
</rdf:RDF>