semantic web محمد احمدی نیا [email protected]. 2 of 73 outline why semantic web? ...

73
Semantic Web ا ی ن مدی ح مد ا ح م[email protected] m

Upload: hope-charles

Post on 03-Jan-2016

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

Semantic Web

محمد احمدی نیا[email protected]

Page 2: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

2 Of 73

Outline

Why Semantic Web? What is Semantic Web? Semantic Web Main Technologies

XML RDF RDFs OWL

Page 3: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

3 Of 73

Mom

Physician’s Agent

Lucy’s Agent

requiredtreatment

Schedule appointment

Insurance Co.

Provider sites

Rating

in-plan?close-by?

Specialist?

Pete’ Agent

Driving schedule

Semantic Web Scenario

Page 4: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

4 Of 73

The Vision

The World Wide Web (the syntactic 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 has entered most areas of our daily life and business.

Page 5: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

5 Of 73

The Vision

This success is based on its simplicity It’s easy to publish information on the web It’s easy to access information (but if you know where

they are)

Page 6: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

6 Of 73

Why Semantic Web?

Tasks often require to combine data on the Web: hotel and travel information may come from different

sites searches in different digital libraries

Humans combine these information easily even if different terminologies are used the information is incomplete, or buried in images,

videos, … But Machines?

Page 7: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

7 Of 73

Impossible using the Syntactic Web…

Complex queries involving background knowledge Find information about “animals that use sonar but are

not either bats or dolphins” Locating information in data repositories

Travel enquiries Prices of goods and services Results of human genome experiments

Finding and using “web services” Delegating complex tasks to web “agents”

Book me a holiday next weekend somewhere warm, not too far away, and where they speak French or English

Page 8: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

8 Of 73

What is the Problem?

Page 9: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

9 Of 73

Challenge

Query What is the name of a person who is a member of an

organization in Iran, and likes a kind of sport?

Page 10: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

10 Of 73

Why Semantic Web?

(Some) data should be available for machines for further processing Metadata: Data about data

Data should be possibly combined, merged on a Web scale

Machines may also need to reason about that data

Page 11: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

11 Of 73

What is Semantic Web?

Tim Berners-Lee:

“The Semantic Web is an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation.” 2001

Page 12: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

12 Of 73

Semantic Web “The Semantic Web will bring structure

to the meaningful content of Web pages, creating an environment where software agents roaming from page to page can readily carry out sophisticated tasks for users” 2001

Page 13: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

13 Of 73

Current Web

Page 14: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

14 Of 73

Current Web

Resources identified by URI's untyped

Links href, src, ... limited, non-descriptive

User Exciting world - semantics of the resource, however, gleaned from content

Machine: Very little information available - significance of the links only evident from

the context around the anchor.

Page 15: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

15 Of 73

Semantic Web

Page 16: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

16 Of 73

Semantic Web

Resources Globally Identified by URI's Extensible Relational

Links Identified by URI's Extensible Relational

User Even more exciting world, richer user experience

Machine More processable information is available (Data Web)

Computers and people Work, learn and exchange knowledge effectively

Page 17: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

17 Of 73

Semantic Web Technologies

The Semantic Web extends the Web through the use of standards, markup languages and related processing tools

Page 18: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

18 Of 73

Semantic Web Architecture

Page 19: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

19 Of 73

A Simple Web Page

Markup consists of: rendering information (e.g.,

font size and colour) Hyper-links to related

content

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

Page 20: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

20 Of 73

Challenge

Query What is the name of a person who is a member of an

organization in Iran, and likes a kind of sport?

Page 21: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

21 Of 73

What information can we see…

Hi!

My name is Ali!

This is my homepage. I am a student at Ferdowsi University of Mashhad.

I like football.

Page 22: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

22 Of 73

The Page Source Code in HTML

<html> <head> <title>Ali's Homepage </title></head><body> <p><b>Hi!</b></p> <p><b>My name is Ali!</b></p> </b> <p>This is my homepage. I am a student at <a href=

“http://um.ac.ir">Ferdowsi University of Mashhad</a>.</p> <p>I like football.</p>

</body></html>

Page 23: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

23 Of 73

What information can a machine see…

<html> <head> <title>…………………..</title></head><body> <p><b>………</b></p> <p><b>....................</b></p> </b> <p>…………………………………………..……<a

href=“………………”>…………………..</a>.</p> <p>............................</p>

</body></html>

Page 24: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

XML

Page 25: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

25 Of 73

XML

eXtensible Markup Language XML allows users to add arbitrary structure to their

documents but says nothing about what the structures mean

Page 26: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

26 Of 73

Solution: XML “meaningful” tags

………………………….

<student>………………….</student><university>……………………..<university>

…………………………………………………………………………………………………….

Page 27: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

27 Of 73 27

HTML vs. XML

HTML is for humans HTML describes web pages Browsers ignore and/or correct as many HTML errors as they can,

so HTML is often sloppy XML is for computers

XML describes data The rules are strict and errors are not allowed

In this way, XML is like a programming language Current versions of most browsers can display XML

However, browser support of XML is spotty at best

Page 28: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

28 Of 73 28

XML Building blocks The XML declaration looks like this:

<?xml version="1.0" encoding="UTF-8“ ?>

Identify the nature of the content they surround General format:

<element attribute=“value” > … </element>

Empty element: <empty-Element attribute=“value” />

XML Elements have Relationships Elements are related as parents and children <name>

<first>David</first> <last>Matuszek</last>

</name>

Page 29: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

29 Of 73 29

XML Applications

XML is used to Exchange Data Reduce the complexity of interpreting data

XML can be used to Store Data Accessible to more applications

XML can be used to Create new Languages, e.g. : WML (Wireless Markup Language), MusicXML

Page 30: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

30 Of 73 30

XML Validation

"Well Formed" XML document correct XML syntax

"Valid" XML document “well formed” Conforms to the rules of a DTD

XML DTD defines the legal building blocks of an XML document Can be inline in XML or as an external reference

XML Schema an XML based alternative to DTD, more powerful Support namespace and data types

Page 31: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

31 Of 73 31

An Example XML with DTD

<?xml version="1.0"?><!DOCTYPE note [

<!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>

]> <note>

<to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend</body>

</note>

Page 32: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

32 Of 73 32

XML Schemas

“Schema” is a general term DTDs are a form of XML schemas

When we say “XML Schemas,” we usually mean the W3C XML Schema Language This is also known as “XML Schema Definition”

language, or XSD.

Page 33: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

33 Of 73

But What if?

………………………….

<boy>………………….</boy><college>……………………..<college>…………

………………………………………………………………………………………….

Page 34: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

RDF

Page 35: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

35 Of 73

RDF

Resource Description Framework A data model

o Meaning encoded in sets of ‘triples’: entities have properties which have values

o Each triple: subject-predicate-object

o Entities, properties and values all have distinct URIs

Page 36: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

36 Of 73

RDF Model

A model is a collection of statements Statement := (predicate,subject,object) Predicate is a resource Subject is a resource Object is either a resource or a literal

Subject Object

Predicate

Statement

Page 37: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

37 Of 73

RDF

AliFerdowsi

University of Mashhad

studentOF

http://um.ac.ir

hasHomePage

Page 38: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

38 Of 73

RDF

<rdf:Description about="some.uri/person/ali"><studentOf resource="some.uri/Ferdowsi_University_of_Mashhad"/>

</Description>

<Description about="Ferdowsi_University_of_Mashhad"> <hasHomePage>http://um.ac.ir</hasHomePage></rdf:Description>

Page 39: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

39 Of 73

Example

We are looking for a woman who works for one of my client and her son studies at University of Rovaniemi

Page 40: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

40 Of 73 40

XML vs. RDF RDF is not just an XML dialect.

XML: Has a tree structure data model. Only nodes are labeled.

RDF: Has a graph structure data model. Both edges (properties) and nodes (subjects/objects) are

labeled.

Page 41: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

41 Of 73

Challenge

Query What is the name of a person who is a member of an

organization in Iran, and likes a kind of sport?

Page 42: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

42 Of 73

But…

What is the relation between a Student and a Person? Football and Sport? University and College? University and Website?

Ontology is the solution

Page 43: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

Ontology

Page 44: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

44 Of 73

Ontology

To answer the query it is required to tell the machine that There is a class of objects named ‘Student’ There is a class of objects named ‘Person’ Each Student is a Person Each Person has a Name There is a class of objects named ‘Sport Type’ Football is a kind of Sport There is an instance of a Student that its Name is “Ali” ….

Page 45: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

45 Of 73

Ontology

Philosophy The study of what is, what has to be true for

something to exist, the kinds of things that can exist

AI and computer science Co-opted the term. Something exists if it can be

represented, described, defined (in a formal, hence, machine-interpretable way).

Page 46: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

46 Of 73

Ontology Ontologies are about vocabularies and their meanings, with

explicit, expressive, and well-defined semantics, possibly machine-interpretable.

“Ontology is a formal specification of a conceptualization.” Gruber, 1993

Main elements of an ontology: Concepts Relationships

Hierarchical Logical

Properties Instances (individuals)

Page 47: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

47 Of 73

Ontology

Page 48: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

48 Of 73

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

Page 49: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

49 Of 73

Ontology

Ontology Languages RDFS (RDF Schema) OWL SHOE DAML+OIL

Page 50: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

50 Of 73

RDF Schema (RDFS)

RDF gives a formalism for meta data annotation, and a way to write it down in XML, but it does not give any special meaning to vocabulary such as subClassOf

RDF Schema allows you to define vocabulary terms and the relations between those terms in special domain it gives “extra meaning” to particular RDF predicates and

resources

this “extra meaning”, or semantics, specifies how a term should be interpreted

Page 51: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

51 Of 73

Core Classes & PropertiesCore Classes

Core Properties

rdfs:Resource

rdfs:Literal

rdfs:Statement

rdfs:Class

rdfs:Property

rdfs:Type

rdfs:SubClassOf

rdfs:SubPropertyOf

rdfs:Domain

rdfs:Range

rdfs:Label

rdfs:Comment

Page 52: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

52 Of 73

RDF &RDFS (a sample)

زبانهای برنامه سازی وب

Page 53: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

53 Of 73

RDFS Sample Code<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<rdfs:Class rdf:ID=“professor">

<rdfs:comment>

The class of professor All professors are academic staff members.

</rdfs:comment>

<rdfs:subClassOf rdf:resource="#academicStaffMember"/>

</rdfs:Class>

<rdfs:Class rdf:ID="academicStaffMember">

<rdfs:comment>

The class of academic staff members

</rdfs:comment>

<rdfs:subClassOf rdf:resource="#staffMember"/>

</rdfs:Class>

<rdfs:Class rdf:ID="staffMember">

<rdfs:comment>The class of staff members</rdfs:comment>

</rdfs:Class>

زبانهای برنامه سازی وب

Page 54: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

54 Of 73

RDFS Sample Code …<rdfs:Class rdf:ID="course">

<rdfs:comment>The class of courses</rdfs:comment>

</rdfs:Class>

<rdf:Property rdf:ID="involves">

<rdfs:comment>

It relates only courses to lecturers.

</rdfs:comment>

<rdfs:domain rdf:resource="#course"/>

<rdfs:range rdf:resource="#academicStaffMember "/>

</rdf:Property>

<rdf:Property rdf:ID="isTaughtBy">

<rdfs:comment>

Inherits its domain ("course") and range ("lecturer")

from its superproperty "involves"

</rdfs:comment>

<rdfs:subPropertyOf rdf:resource="#involves"/>

</rdf:Property>

زبانهای برنامه سازی وب

Page 55: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

55 Of 73

Problems with RDFS 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

Page 56: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

56 Of 73

OWL (Ontology Web Language) OWL is now a W3C Recommendation The purpose of OWL is identical to RDFS i.e. to provide an

XML vocabulary to define classes, properties and their relationships. RDFS enables us to express very rudimentary relationships

and has limited inferencing capability. OWL enables us to express much richer relationships, thus

yielding a much enhanced inferencing capability. The benefit of OWL is that it facilitates a much greater degree

of inference than you get with RDF Schema.

Page 57: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

57 Of 73

Origins of OWL

RDFRDF

DAML+OILDAML+OIL

DARPA Agent Markup Language

A W3C Recommendation

OILOIL

OWLOWL

All influenced by RDF

Ontology Inference Layer

EU/NSF Joint Ad hoc Committee

DAMLDAML

OWL LiteOWL DL OWL Full

Page 58: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

58 Of 73

OWL OWL and RDF Schema enable rich machine-processable semantics

XML/DTD/XML Schemas

RDF Schema

OWL

Semantics

Syntax

<rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/></rdfs:Class>

<owl:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/></owl:Class>

RDFS

OWL

Page 59: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

59 Of 73

Full: Very expressive, no computation guarantees

DL (Description Logic): Maximum expressiveness, computationally complete

Lite: Simple classification hierarchy with simple constraints.

Versions of OWL

Depending on the intended usage, OWL provides three increasingly expressive sublanguages

OWL Full

OWL DL

OWL Lite

Page 60: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

60 Of 73

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, equivalence,

symmetry …) Annotations Individuals

Reasoning tasks: classification,consistency checking

Page 61: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

61 Of 73

owl:Class

Top-most class: owl:Thing

>owl:Class rdf:ID=“Person</">owl:Class rdf:ID=“Man<"

>rdfs:subClassOf rdf:resource="#Person </ "/>owl:Class<

Page 62: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

62 Of 73

Properties

What is a Property? e.g., has_father, has_pet, service_number a collection of relationships between individuals (and

data) a way of describing a kind of relationship between

individuals an object in the world (OWL Full)

Page 63: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

63 Of 73

OWL PropertiesObject

Properties

Ana has_father David

Is range a

literal / typed value ?

then ERROR

Data type

Properties

Ana age 25

XML Schema data types supported DB people happy

Page 64: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

64 Of 73

Defining Properties

ObjectProperty DatatypeProperty rdfs:subPropertyOf rdfs:domain rdfs:range

<owl:ObjectProperty rdf:ID="madeFromGrape"> <rdfs:domain rdf:resource="#Wine"/> <rdfs:range rdf:resource="#WineGrape"/> </owl:ObjectProperty>

Page 65: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

65 Of 73

Describing classes in OWLComplex Classes

Intersection of classes (owl:intersectionOf) OR (A B)

Union of classes (owl:unionOf) AND (A B)

Complement (owl:complementOf) NOT

Enumeration (owl:oneOf)

Disjoint Classes (owl:disjointWith)

Page 66: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

66 Of 73

Describing classes in OWLRestrictions on Property Classes

Properties: allValuesFrom: rdfs:Class (lite/DL owl:Class) hasValue: specific Individual someValuesFrom: rdfs:Class (lite/DL owl:Class) minCardinality: xsd:nonNegativeInteger (in lite {0,1}) maxCardinality: xsd:nonNegativeInteger (in lite {0,1})

Page 67: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

67 Of 73

Describing properties in OWLOWL vs. RDFS RDF Schema provides some of predefined properties:

rdfs:range used to indicate the range of values for a property. rdfs:domain used to associate a property with a class. rdfs:subPropertyOf used to specialize a property. …

OWL provides additional predefined properties: owl:cardinality (indicate cardinality) owl:hasValue (at least one of the specified property values) …

OWL provides additional property classes, which allow reasoning and inferencing: owl:FunctionalProperty owl:TransitiveProperty …

Page 68: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

68 Of 73

OWL Cardinality

min Cardinality max Cardinality

“Cardinality” When min = max

has Value belongs to the class if it has the value

Page 69: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

69 Of 73

An Example OWL ontology<owl:Class rdf:ID=“Person” /><owl:Class rdf:ID=“Man”>

<rdfs:subClassOf rdf:resource=“#Person” /><owl:disjointWith rdf:resource=“#Woman” />

</owl:Class><owl:Class rdf:ID=“Woman”>

<rdfs:subClassOf rdf:resource=“#Person” /><owl:disjointWith rdf:resource=“#Man” />

</owl:Class><owl:Class rdf:ID=“Father”>

<rdfs:subClassOf rdf:resource=“Man” /><owl:Restriction owl:minCardinality="1">

<owl:onProperty rdf:resource="#hasChild" /></owl:Restriction>

</owl:Class><owl:ObjectProperty rdf:ID=“hasChild">

<rdfs:domain rdf:resource="#Parent" /><rdfs:range rdf:resource="#Person" />

</owl:ObjectProperty>

Page 70: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

70 Of 73

Semantic Web: Now

Numerous web technologies, languages, formats, and standards which provide the inferastructure URI, XML, XML Schema, RDF, RDFS, OWL,

SPARQL, SerQL, HTTP, Microformats, RDFa,

Page 71: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

71 Of 73

Semantic Web: Now

A large body of research and activity is related to ontologies, since they play a main role Ontology engineering issues and tools

ontology development, ontology selection, ontology matching, ontology evaluation, ontology partitioning,….

Numerous Ontologies are developed in different domains, e.g. FOAF, DOAP, SIOC, SKOS, …

Page 72: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

72 Of 73

Semantic Web: Now

Semantic Web technologies are used as an enabler in different areas to develop small semantic web applications Ontology-based ….. Ontology-enabled … Semantic-Web-Enabled … Semantic ….

Page 73: Semantic Web محمد احمدی نیا ahmadinia@gmail.com. 2 Of 73 Outline  Why Semantic Web?  What is Semantic Web?  Semantic Web Main Technologies  XML

73 Of 73

Semantic Web: Now

Semantic Web Search Engines Swoogle, SWSE, Watson, Falcons, Yahoo!

Microsearch, ….