Semantic Web Dr. Mohsen Kahani [email protected] kahani

63
Semantic Web Dr. Mohsen Kahani [email protected] http://web.um.ac.ir/ ~kahani/
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    245
  • download

    0

Transcript of Semantic Web Dr. Mohsen Kahani [email protected] kahani

Page 1: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Semantic Web

Dr. Mohsen Kahani

[email protected]

http://web.um.ac.ir/~kahani/

Page 2: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

SW Scenario

“At the doctor's office, Lucy instructed her Semantic Web agent through her handheld Web browser. The agent promptly retrieved information about Mom's prescribed treatment from the doctor's agent, looked up several lists of providers, and checked for the ones in-plan for Mom's insurance within a 20- mile radius of her home and with a rating of excellent or very good on trusted rating services. It then began trying to find a match between available appointment times (supplied by the agents of individual providers through their Web sites) and Pete's and Lucy's busy schedules.”(The emphasized keywords indicate terms whose semantics, or meaning, were defined for the agent through the Semantic Web.)

Scientific American: The Semantic Web: May 2001<http://www.sciam.com/2001/0501issue/0501berners-lee.html>

Scientific American: The Semantic Web: May 2001<http://www.sciam.com/2001/0501issue/0501berners-lee.html>

Page 3: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Doctor’s appointmentDoctor’s appointment“The Semantic Web”, “The Semantic Web”, Scientific American, May 2001Scientific American, May 2001

MomPhysician’s Agent

Lucy’s Agent

requiredtreatment

Schedule appointment

Insurance Co.

Provider sites

Rating

in-plan?close-by?

Specialist?

Pete’ Agent

Driving schedule

Page 4: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

“Most of the Web's content today is designed for humans to read, not for computer programs to manipulate meaningfully.”

Berners-Lee, T, Hendler, J & Lassila, O ‘The semantic web’, Scientific American, May 2001

Page 5: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Where we are Today: the Syntactic Web

Page 6: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

URI, HTML, HTTPStaticWWW

500 million usermore than 8 billion pages

Current Web

Page 7: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

The vision The World Wide Web is a big and impressive

success story, both in terms of the amount of available information and the growth rate of human users

It starts to penetrate most areas of our daily life and business.

This success is based on its simplicity

the restrictivenss of HTTP and HTML allowed software developers, information providers and users to make easy access of the new media helping it to reach a critical mass

Page 8: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

The Vision

However this simplicity may hamper the further development of the Web

What we see currently is the very first version of the web and the next version will probably even more bigger and much powerful compared to what we have now.

Page 9: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

URI, HTML, HTTPStaticWWW

Serious Problems in information•finding

•extracting•representing•interpreting

•and maintaining

RDF, RDF(S), OWLSemantic Web

Semantic Web

Page 10: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Semantic Web Technology

Tim Berners-Lee has a vision of a Semantic Web which has machine-understandable

semantics of information, and millions of small specialized

reasoning services that provide support in automated task achievement based on the accessible information

Page 11: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

The Syntactic Web is…

A hypermedia, a digital library A library of documents called (web pages) interconnected by

a hypermedia of links A database, an application platform

A common portal to applications accessible through web pages, and presenting their results as web pages

A platform for multimedia BBC Radio 4 anywhere in the world! Terminator 3 trailers!

A naming scheme Unique identity for those documents

A place where computers do the presentation (easy) and people do the linking and interpreting (hard).

Why not get computers to do more of the hard work?

Page 12: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

What is the Problem?

Markup consists of: Markup consists of: rendering information rendering information

(e.g., font size and (e.g., font size and colour)colour)

Hyper-links to related Hyper-links to related contentcontent

Semantic content is Semantic content is accessible to humans but accessible to humans but not (easily) to computers…not (easily) to computers…

Page 13: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

What information can we see…WWW2002The eleventh international world wide web conferenceSheraton waikiki hotelHonolulu, hawaii, USA7-11 may 20021 location 5 days learn interactRegistered participants coming fromaustralia, canada, chile denmark, france, germany, ghana, hong kong, india,

ireland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switzerland, the united kingdom, the united states, vietnam, zaire

Register nowOn the 7th May Honolulu will provide the backdrop of the eleventh international

world wide web conference. This prestigious event …Speakers confirmedTim berners-lee Tim is the well known inventor of the Web, …Ian FosterIan is the pioneer of the Grid, the next generation internet …

Page 14: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

What information can a machine see…

………

Page 15: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Solution: XML markup with “meaningful” tags?

<name> </name><location>

</location>

<date> </date>

<slogan> </slogan>

<participants>

</participants>

<introduction>

… </introduction>

<speaker> </speaker>

<bio> </bio>…

That is, structure and semantics of documents are interwoven

Agree upon the meaning of tags through the use of namespaces

Page 16: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

XML Is Not Enough!XML Is Not Enough!XML: XML:

Should be usedShould be used Is extensible (DC qualifiers)Is extensible (DC qualifiers)

But:But: XML describes the syntaxXML describes the syntax Does not provide semantics (what does DC.Creator Does not provide semantics (what does DC.Creator meanmean?)?) The meaning may be agreed & understood within DC The meaning may be agreed & understood within DC

applications – but this does not allow for applications – but this does not allow for extensibilityextensibility Similar applications may be described using different XML Similar applications may be described using different XML

DTDs: e.g. is DTDs: e.g. is <Creator><Creator> the same as the same as <le-Cr<le-Crééator>ator> or or <Доклады><Доклады>

<DC.Creator>Brian Kelly</DC.Creator><DC.Creator.email>[email protected]</DC.Creator.email>

Page 17: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Scenario – Buying A CarScenario – Buying A Car

UserUserYou live in London and want to buy a car locally. You can You live in London and want to buy a car locally. You can afford up to £500. The car must be red.afford up to £500. The car must be red.

Honest EuroJoe’s Used Car Web SiteHonest EuroJoe’s Used Car Web SiteJoe uses:Joe uses:

<car><location>Brixton</location><price>€400</price><colour>maroon</colour><description>Old banger</description><model>Ford Escort</model>

</car>

Result• Car not found – even though structured information is provided. • A human would know that this was a valid match, because it

understands the meanings and relationships.• The Semantic Web aims to solve this problem.

Page 18: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

We Need Extensibility!We Need Extensibility!

We can see a progression from Web sites which are:We can see a progression from Web sites which are: Understandable by humansUnderstandable by humans

<h1>Joe’s Used Cars</h1><h2>Ford Escort</h2><p>This maroon car costs €400

We need a mechanism which allows equivalent resources to be identified, without programming this knowledge into software

<company>Joe’s Used Cars</company><model>Ford Escort</model><colour>maroon</colour><price>€400</price>

• Understandable by software “in the know”

Page 19: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Buying Car On The Semantic WebBuying Car On The Semantic WebJoe is part of the motor trade Joe is part of the motor trade association, which has association, which has defined its own schema for defined its own schema for selling cars.selling cars.

Joe’s Used Car Web Sitedatabase

Motor Trade

schema

ScottishMotor Trade

schema

Forddealersschema

Mapping service

The Scots use a different schema, as do the car manufacturers (which mainly sell new cars).

A mapping service provides a mapping between these machine-understandable schemata.

modelvehicle-type

Wordnet

Wordnet maps relationships between words (e.g. red and maroon)

Page 20: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

The Semantic WebThe Semantic Web

A Vision Of PossibilitiesA Vision Of Possibilities““The Semantic Web is an extension of The Semantic Web is an extension of the current web in which information is the current web in which information is given well-defined meaning, better given well-defined meaning, better enabling computers and people to work in enabling computers and people to work in cooperation.cooperation.””-- Tim Berners-Lee, James Hendler-- Tim Berners-Lee, James Hendler and and Ora Ora Lassila, The Semantic WeLassila, The Semantic Web, Scientific b, Scientific American, May 2001American, May 2001

Page 21: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Scenario – Buying A Car (2)Scenario – Buying A Car (2)

We’ve seen how this query can be answered:We’ve seen how this query can be answered:

The Semantic Web will be extensible enabling The Semantic Web will be extensible enabling interactions with other services which may use interactions with other services which may use different XML DTDs:different XML DTDs:

Give me the AA’s report on this type of car.OK here it isCheck the DVLA details for the reg. no.OK – the car is registered correctly

Find me a red car in London for < £500.How about this maroon Escort in Brixton for €400?

Page 22: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Model For Buying A Car Model For Buying A Car

Joe’s Used Car Web Sitedatabase

Motor Trade

schema

ScottishMotor Trade

schema

Forddealersschema

Mapping service

AAvehicleschema

DVLAschema

Value-addedservices

AA Web site

With machine-understandable data it becomes easier to extend services

Page 23: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Need to Add “Semantics”

External agreement on meaning of annotations E.g., Dublin Core

Agree on the meaning of a set of annotation tags

• Title: A name given to the resource. • Creator: An entity primarily responsible for making the • Subject: The topic of the content of the resource. • Description: An account of the content of the resource.

• …. Problems with this approach

• Inflexible• Limited number of things can be expressed

Page 24: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Need to Add “Semantics” (Cont.)

Motivation toward RDF(S), DAML+OIL, OWL,…

- Establish a widely accepted standard for representing expressive declarative knowledge on the Web.

Knowledge Representation Knowledge sharing Communication Language for query

Page 25: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Representation Language (RL)

Representation means that we encode the description in a way that enables someone to use it

Some representational languages are: - UML - RDF(S) - Topic Maps - DAML+OIL - OWL - …..

Page 26: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Levels of Representation Needed for Models

Syntax - An XML document is syntactically correct or not

Structure - Validating an XML document with respect to DTD or XML

Schema language

Semantic - Mapping between some structured subset of data and a

model of some set of objects in the domain

Pragmatics - Has to do with the intent of the semantics and actual

semantic usage

Page 27: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDF (Resource Description

Framework)• RDF provides a way of describing resources via metadata (data about data) It restricts the description of resources to triplets (subject,predicate,object)

• It provides interoperability between applications that exchange machine understandable information on the Web.

• The original broad goal of RDF was to define a mechanism for describing

resources that makes no assumptions about a particular application domain, nor defines (a priori) the semantics of any application domain.

• Uses XML as the interchange syntax. • Provides a lightweight ontology system.

The formal specification of RDF is available at:http://www.w3.org/TR/REC-rdf-syntax/

Page 28: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDF (cont’d) An example of RDF using the Dublin Core

language<? xml version="1.0" ?><RDF xmlns = http://w3.org/TR/1999/PR-rdf-syntax-19990105# xmlns:DC = "http://purl.org/DC#"> <Description about = "http://dstc.com.au/report.html" > <DC:Title> The Future of Metadata </DC:Title> <DC:Creator> Jacky Crystal </DC:Creator> <DC:Date> 1998-01-01 </DC:Date> <DC:Subject> Metadata, RDF, Dublin Core </DC:Subject> </Description> </RDF>

Page 29: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDF Syntax

Subject, Predicate and Object Triplets (Tuples)

• Subject: The resource being described.• Predicate: A property of the resource• Object: The value of the property

A combination of them is said to be a Statement (or a rule)

http://foo.bar.org/index.html John DoeAuthor

A web pagebeing described

[Subject]

A property of theweb page (author)

[Predicate]

The value of the predicate(here the author)

[Object]

Page 30: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDF Example<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#" xmlns:s="http://description.org/schema/">

<rdf:Description about="http://foo.bar.org/index.html"> <s:Author>John Doe</s:Author> </rdf:Description> </rdf:RDF>

Namespace for the RDF spec

Namespace ‘s’, a custom namespace

Subject

Author (property of the subject)(Also a resource)Object. Can also point to a resource

The above statement says :The Author of http://foo.bar.org/index.html is “John Doe”

In this way, we can have different objects (resources) pointing to other objects (resources)

You can also make statements about statements – reificationEx: ‘xyz’ says that ‘ The Author of http://foo.bar.org/index.html is John Doe’

Page 31: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDF Schema

• A schema defines the terms that will be used in the RDF statements and gives specific meanings to them.

http://www.w3.org/TR/rdf-schema/

Example:<rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<rdf:Description ID="MotorVehicle"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/></rdf:Description>

<rdf:Description ID="PassengerVehicle"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description>

<rdf:Description ID="Truck"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description>

RDF Schema Namespace

An “ID” attribute actually defines a new resource

PassengerVehicle is a subclass of MotorVehicle

“Resource” is the top level class

Page 32: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Example (cont..)

<rdf:Description ID="Van"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description>

<rdf:Description ID="MiniVan"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/></rdf:Description>

<rdf:Description ID="registeredTo"> <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/> <rdfs:domain rdf:resource="#MotorVehicle"/> <rdfs:range rdf:resource="#Person"/></rdf:Description>

<rdf:Description ID="rearSeatLegRoom"> <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/> <rdfs:domain rdf:resource="#PassengerVehicle"/> <rdfs:domain rdf:resource="#Minivan"/> <rdfs:range rdf:resource="http://www.w3.org/2000/03/example/classes#Number"/></rdf:Description></rdf:RDF>

Domain of a property

Range of a property

Multiple Inheritance

Page 33: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Ontology

Ontology is a term borrowed from philosophy that refers to the science of describing the kinds of entities in the world and how they are related

An OWL ontology may include descriptions of classes, properties and their instances.

Page 34: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

What is Ontology…...

an ontology is a formal, explicit specification of a shared conceptualization – Gruber ‘Conceptualization’ refers to an abstract model of

phenomena in the world by having identified the relevant concepts of those phenomena.

‘Explicit’ means that the type of concepts used, and the constraints on their use are explicitly defined.

‘Formal’ refers to the fact that the ontology should be machine readable.

‘Shared’ reflects that ontology should capture

consensual knowledge accepted by the communities

Page 35: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Example: Example: Cars Ontology with RDF Schema SemanticsCars Ontology with RDF Schema Semantics

@cars {@cars {

xyz:MotorVehicle[rdfs:subClassOf -> rdfs:Resource].xyz:MotorVehicle[rdfs:subClassOf -> rdfs:Resource].

xyz:PassengerVehicle[rdfs:subClassOf -> xyz:MotorVehicle].xyz:PassengerVehicle[rdfs:subClassOf -> xyz:MotorVehicle].

xyz:Truck[rdfs:subClassOf -> xyz:MotorVehicle]. xyz:Truck[rdfs:subClassOf -> xyz:MotorVehicle].

xyz:Van[rdfs:subClassOf -> xyz:MotorVehicle].xyz:Van[rdfs:subClassOf -> xyz:MotorVehicle].

xyz:MiniVan[xyz:MiniVan[

rdfs:subClassOf -> xyz:Van;rdfs:subClassOf -> xyz:Van;

rdfs:subClassOf -> xyz:PassengerVehicle]. rdfs:subClassOf -> xyz:PassengerVehicle].

}}

xyz:MotorVehicle

xyz:Vanxyz:Truc

k

xyz:PassengerVehicle

xyz:MiniVan

X = xyz:Van X = xyz:Van

X = xyz:Truck X = xyz:Truck

X = xyz:PassengerVehicle X = xyz:PassengerVehicle

FORALL X <- FORALL X <- X[rdfs:subClassOf -> xyz:MotorVehicle]@cars.X[rdfs:subClassOf -> xyz:MotorVehicle]@cars.

FORALL X <- FORALL X <- X[rdfs:subClassOf -> xyz:MotorVehicle]@rdfschema(cars).X[rdfs:subClassOf -> xyz:MotorVehicle]@rdfschema(cars).

X = xyz:Van X = xyz:Van

X = xyz:Truck X = xyz:Truck

X = xyz:PassengerVehicle X = xyz:PassengerVehicle

X = xyz:MiniVanX = xyz:MiniVan

Page 36: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

OIL OIL adds a simple Description Logic to

RDF Schema It allows to define axioms that logically

describe classes, properties and their hierarchies

OIL enables to define necessary and sufficient conditions that define class membership of instances

Page 37: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

OIL

OIL Developed in the Ontoknowledge project

www.ontoknowledge.org

Core language contains consensus primitives, extensions add aditional expresiveness

Layered architecture:• Applications are not forced to work with a language more

complex and expresive than required• Applications that can only process a low level of complexity are

able to catch the aspects of the ontology• Applications aware of higher level of complexity can still

understand a simpler ontology language

Page 38: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

OIL

Description Logic:

Formal Semantics & Reasoning support

Description Logic:

Formal Semantics & Reasoning support

Web languages:

XML- and RDF-based syntax

Web languages:

XML- and RDF-based syntax

Frame-based systems:

Epistemological Modeling Primitives

Frame-based systems:

Epistemological Modeling Primitives

Page 39: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

DAML+OIL

DAML+OIL Semantic markup language

Joint efford of the American and European communities

DAML+OIL = DAM-ONT + OIL

Designed to describe the structure of a domain in terms of classes and objects

Supports full range of datatypes in XML

Page 40: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

An Example (from www.daml.org)

<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:daml="http://www.daml.org/2000/12/daml+oil#" xmlns ="http://www.daml.org/2000/12/daml+oil-ex#">

<daml:Ontology about=“”><daml:versionInfo>An example ontology</daml:versionInfo>

<rdfs:Class rdf:ID="Animal"> <rdfs:label>Animal</rdfs:label> <rdfs:comment> This class of animals is illustrative of a number of ontological idioms. </rdfs:comment></rdfs:Class>

<rdfs:Class rdf:ID="Male"> <rdfs:subClassOf rdf:resource="#Animal"/></rdfs:Class>

<rdfs:Class rdf:ID="Female"> <rdfs:subClassOf rdf:resource="#Animal"/> <daml:disjointWith rdf:resource="#Male"/></rdfs:Class>

<rdfs:Class rdf:ID="Man"> <rdfs:subClassOf rdf:resource="#Person"/> <rdfs:subClassOf rdf:resource="#Male"/></rdfs:Class>

Can explicitly specify the set of Females to be disjoint with the set of Males

Start of an ontology (about = “” implies ‘this’ document)

The label is not used for logical interpretation

To be read conjunctively. A man is a sub-class of ‘Person’ and a ‘Male’

The Person class is defined later

Page 41: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Example (contd..)<rdfs:Class rdf:ID="Woman"> <rdfs:subClassOf rdf:resource="#Person"/> <rdfs:subClassOf rdf:resource="#Female"/></rdfs:Class>

<rdf:ObjectProperty rdf:ID="hasParent"> <rdfs:domain rdf:resource="#Animal"/> <rdfs:range rdf:resource="#Animal"/></rdf:ObjectProperty>

<rdf:ObjectProperty rdf:ID="hasFather"> <rdfs:subPropertyOf rdf:resource="#hasParent"/> <rdfs:range rdf:resource="#Male"/></rdf:ObjectProperty>

<daml:DatatypeProperty rdf:ID="age"> <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/></daml:DatatypeProperty

<rdfs:Class rdf:ID="Person"> <rdfs:subClassOf rdf:resource="#Animal"/> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:resource="#hasParent"/> <daml:toClass rdf:resource="#Person"/> </daml:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <daml:Restriction daml:cardinality="1"> <daml:onProperty rdf:resource="#hasFather"/> </daml:Restriction> </rdfs:subClassOf></rdfs:Class>

Restrictions on the property hasParent (only for thePerson class – Local scope, as opposed to rdfs:range)A person can have only another Person as it’s parent

An objectProperty relates objects to objects

Describes the element which encloses this Property

Describes the value of the Property

Note: Contrary to RDF, DAML takes the ‘intersection’ of the domains/ranges if multiple domains/ranges are specified

A datatype property relates an object to a primitive datatype value

The XML Schema datatype is referenced here

A Person can have only 1 Father

The Restriction defines an anonymous class of all thingsthat satisfy the restriction.

Page 42: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Example (contd..)<rdfs:Class rdf:about="#Animal"><rdfs:subClassOf> <daml:Restriction daml:cardinality="2"> <daml:onProperty rdf:resource="#hasParent"/> </daml:Restriction> </rdfs:subClassOf></rdfs:Class>

<rdfs:Class rdf:about="#Person"> <rdfs:subClassOf> <daml:Restriction daml:maxcardinality="1"> <daml:onProperty rdf:resource="#hasSpouse"/> </daml:Restriction> </rdfs:subClassOf></rdfs:Class>

Further constructs that the example doesn’t use :Properties: TransitiveProperty (hasAncestor), UniqueProperty (hasMother), inverseOf(hasChild -> hasParent), etc.

Classes: intersectionOf (a daml:collection), unionOf (a daml:collection), sameClassAs, complementOf, etc.

Restrictions on the property hasParentAn animal can have exactly 2 parents

Restrictions on the property hasSpouseA person can have only 1 spouse

Addition to the Animal Class without modifying it -- “about”

Page 43: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

OWL

OWL Under development of W3C Web Ontology Working Group DAML+OIL based Offers:

• More accurate web searches• Intelligent agents• Knowledge management

Abstract syntax that provides:• Higher level way of writing ontologies• Clear statement of semantics• Compound axioms resembling frames

OWL-lite OWL sublanguage OWL-lite = RDFs + 0/1 cardinality Suites well to express light weight ontologies Limited expresiveness power

• Some fields require a full-fledged semantic web modeling language

Page 44: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

OWL Example

<owl:Class rdf:ID="Fruit"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#SweetFruit" /> <owl:Class rdf:about="#NonSweetFruit" /> </owl:unionOf> </owl:Class>

<owl:ObjectProperty rdf:ID="adjacentRegion"> <rdf:type rdf:resource="&owl;SymmetricProperty" /> <rdfs:domain rdf:resource="#Region" /> <rdfs:range rdf:resource="#Region" /></owl:ObjectProperty>

<Region rdf:ID="MendocinoRegion"> <locatedIn rdf:resource="#CaliforniaRegion" /> <adjacentRegion rdf:resource="#SonomaRegion" /> </Region>

Page 45: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani
Page 46: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Event:title

Event:WebPage

< > rdf:type photo:Photograph, Photo:File http://…/images#image1, Photo:topic :event1#event:speaker.

Event1 a Event:event; date “May 7-11”, speaker http://…#timbl.html Title “WWW 2002…”

TimBL rdf:type w3c-ont:person; name “Tim Berners-Lee” …

<daml:ObjectProperty rdf:ID="photograph"><rdfs:domain rdf:resource="#Picture"/><rdfs:range rdf:resource= …#person"/></daml:ObjectProperty>

<rdf:Description rdf:about="http://www.w3.org/2001/03/earl/0.95#Person"><rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/><rdfs:subClassOf rdf:resource="http://www.w3.org/2001/03/earl/0.95#Assertor"/></rdf:Description>

<s:Class rdf:about="http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml#Conference"><s:comment>describes a generic conceptabout events </s:comment><s:subClassOf rdf:resource="http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml#Event"/><a:disjointFrom rdf:resource="http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml#Workshop"/><a:restrictedBy rdf:resource="http://www.semanticweb.org/ontologies/swrc-onto-2000-09-10.daml#genid18"/>

Page 47: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Web of Trust Claims can be verified if there is supporting

evidence from another (trusted) source We only believe that someone is a professor at

a university if the university also claims that person is a professor, and the university is on a list I trust.

believe(c1) :- claims(x, c1) ^ predicate(c1, professorAt) ^ arg1(c1, x) ^ arg2(c1, y) ^ claims(c2, y) ^ predicate(c2, professorAt) ^ arg1(c2, x) ^ arg2(c2, y) ^ AccreditedUniversity(y)

AcknowledgedUniversity(u) :- link-from(“http://www.cs.umd.edu/university-list”,u)

Notice this one

Page 48: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Query Languages

A QL defines primitives for queries and answers - A query can be a set of sentences containing some variables

- Adding the ability of representing variables into different RLs

different QLs; produces

- QL is usually related to a RL;

Some query languages are: - SiLRI (Simple Logic-based RDF Interpreter)

- RDQL (RDF Query Language)

- TRIPLE

- DQL (DAML Query Language)

Page 49: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RDQL Examples

finds resources from given URI having age more than 24 SELECT ?resource WHERE (?resource info:age ?age) AND ?age >= 24 USING info FOR <http://example.org/peopleInfo#>

finds the family name and given name from any vcards with formatted name (FN) "John Smith". 

SELECT ?family , ?given WHERE (?vcard vcard:FN "John Smith") (?vcard vcard:N ?name) (?name vcard:Family ?family) (?name vcard:Given ?given) USING vcard FOR “http://www.w3.org/2001/vcard-rdf/3.0#”

Page 50: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

How it may work

rulesKnowledge representation schemeIndex

data-base

query agent

User browser

web page

Page 51: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Semantic Web - Language tower

Page 52: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

ApplicationsApplications

Web QueryWeb QueryRSS RSS (RDF Site Summary)(RDF Site Summary)Knowledge ManagementKnowledge ManagementElectronic CommerceElectronic CommercePervasive ComputingPervasive Computing

Page 53: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Web queries - for real!!Web queries - for real!!

* Query processed: * Query processed: 73 answers found73 answers found Google Google document search finds 235,312 document search finds 235,312

possible page hits.possible page hits. Http://www…jp/JRTrains.htmlHttp://www…jp/JRTrains.html claims the answer is 27 claims the answer is 27 A database entitled “A database entitled “JRTLDB” can be queriedJRTLDB” can be queried

for the answer, but you will need “Japanese for the answer, but you will need “Japanese Railroad Access Code.”Railroad Access Code.”

A computer program that can compute that A computer program that can compute that number is offered by the Tokyo Digital City number is offered by the Tokyo Digital City information analysis, information analysis, click hereclick here to run to run program.program.

......

“How many train lines are there in Tokyo?”

Page 54: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RSSRSS RDF Site Summary (RSS) is a lightweight

multipurpose extensible metadata description and syndication format.

RSS is an XML application An RSS summary, at a minimum, is a

document describing a "channel" consisting of URL-retrievable items.

Each item consists of a title, link, and brief description.

Page 55: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RSS HistoryRSS History "Rich Site Summary“"Rich Site Summary“

Version .91Version .91 "RDF Site Summary“"RDF Site Summary“

Version 1.0Version 1.0 "Really Simple Syndication" "Really Simple Syndication"

Version 2.0Version 2.0

Page 56: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

RSS ExampleRSS Example<channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0"><channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0"> <title>Meerkat</title><title>Meerkat</title> <link>http://meerkat.oreillynet.com</link><link>http://meerkat.oreillynet.com</link> <description>Meerkat: An Open Wire Service</description><description>Meerkat: An Open Wire Service</description> <dc:publisher>The O'Reilly Network</dc:publisher><dc:publisher>The O'Reilly Network</dc:publisher> <dc:creator>Rael Dornfest (mailto:[email protected])</dc:creator><dc:creator>Rael Dornfest (mailto:[email protected])</dc:creator> <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights><dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights> <dc:date>2000-01-01T12:00+00:00</dc:date><dc:date>2000-01-01T12:00+00:00</dc:date> <sy:updatePeriod>hourly</sy:updatePeriod><sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>2</sy:updateFrequency><sy:updateFrequency>2</sy:updateFrequency> <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase><sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<image rdf:resource="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg" /><image rdf:resource="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg" />

<items><items> <rdf:Seq><rdf:Seq> <rdf:li resource="http://c.moreover.com/click/here.pl?r123" /><rdf:li resource="http://c.moreover.com/click/here.pl?r123" /> </rdf:Seq></rdf:Seq> </items></items>

<textinput rdf:resource="http://meerkat.oreillynet.com" /><textinput rdf:resource="http://meerkat.oreillynet.com" />

</channel></channel>

Page 57: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Common uses for Common uses for RSSRSS Blogs – summaries of daily blog posts Newsletters – synopses of newsletters alerting

users that a new newsletter is available Weather Alerts – notification of severe weather Press Announcements – new product

announcements Specials or Discounts – weekly deals or discount

offers for customers Calendars – listings of upcoming events,

deadlines or holidays

Page 58: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Knowledge ManagementKnowledge Management SWAPSWAP

Semantic Web Application PlatformSemantic Web Application Platform On-to KnowledgeOn-to Knowledge

British Telecom Call Center (ontoShare) Swiss Life Application EnerSearch Applications

Page 59: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Electronic CommerceElectronic Commerce Mechanized support is needed in finding

and comparing vendors and their offers. Mechanized support is needed in dealing

with numerous and heterogeneous data formats.

Mechanized support is needed in dealing with numerous and heterogeneous business logics.

Page 60: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Services off the desktopServices off the desktop

Page 61: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Or perhaps on different Or perhaps on different desktops…desktops…

Page 62: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

The Semantic Web: What is it?The Semantic Web: What is it?

Many things to many people..Many things to many people..

Page 63: Semantic Web Dr. Mohsen Kahani kahani@um.ac.ir kahani

Thank you for the attention!

Questions?