46
An Introduction To The Semantic Web

An Introduction To The Semantic Web

Embed Size (px)

DESCRIPTION

An Introduction To The Semantic Web. Information Access on the Web. Find an mp3 of a song that was on the Billboard Top Ten that features a cowbell. The Cowbell Project - http://www.geekspeakweekly.com/cowbell/. The Semantic Web. A Vision Of Possibilities - PowerPoint PPT Presentation

Citation preview

Page 1: An Introduction To  The Semantic Web

1

An Introduction To The Semantic Web

Page 2: An Introduction To  The Semantic Web

2

Information Access on the Web

Find an mp3 of a song that was on the Billboard Top Ten that features a cowbell.

The Cowbell Project - http://www.geekspeakweekly.com/cowbell/

Page 3: An Introduction To  The Semantic Web

3

The Semantic Web

• A Vision Of Possibilities• “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.”

• -- Tim Berners-Lee, James Hendler and Ora Lassila, The Semantic Web, Scientific American, May 2001

Page 4: An Introduction To  The Semantic Web

4

Importance Of URIs• The Semantic Web will build on the distributed nature of the Web:– No central naming authority

• Schema definitions:– Not implied in applications (cf. Web browsers and HTML DTD)

– Accessible in a machine-understandable format using a URI

Page 5: An Introduction To  The Semantic Web

5

What’s Needed• Semantics

Shared schemas: conventions about declaring meaningAgreed ontologies (both terms and ‘rules’ as to how terms relate)Agreed data model (RDF)

• InfrastructureSchema Registries to share schemasCommon syntax (XML)

• The Web for connectivity: URI, HTTP...

Page 6: An Introduction To  The Semantic Web

6

So what is the Semantic Web?

• The semantic web is like the regular web, but its main unit is data, not pages

• Data is online

• Can link to other data in the same file or in other places on the web

Page 7: An Introduction To  The Semantic Web

7

What are the basic units?

• URIs

• Triples– subject – predicate – object

• Ontology– Used for reasoning about data

Page 8: An Introduction To  The Semantic Web

8

Semantic Web• In the Semantic Web we will need:

– Machines talking to machines – semantics need to be unambiguously declared

– Joined-up data – enabling complex tasks based on information from various sources

– Wide scope – from, say, home to government to commerce

– Trust – both in data and who is saying it

• This is not going to be easily achieved

Page 9: An Introduction To  The Semantic Web

9

How do we represent them?

• History– XML, SHOE, DAML, OIL, DAML+OIL

– RDF, RDFS, OWL

Page 10: An Introduction To  The Semantic Web

10

Standardization

• World Wide Web Consortium (W3C)• http://w3.org

Page 11: An Introduction To  The Semantic Web

11

Data looks like a graph

Page 12: An Introduction To  The Semantic Web

12

Classes

• Concepts• Hierarchies• Multiple Inheritance allowed

Page 13: An Introduction To  The Semantic Web

13

Properties

• (aka predicates)• Properties of classes• Object properties (connect instances of classes)

• Datatype properties (connects an instance of a class to a literal value)

Page 14: An Introduction To  The Semantic Web

14

Instances

• Instances of a class – The class is its type

• Properties are used on instances

• Can be of multiple types

Page 15: An Introduction To  The Semantic Web

15

Ontologies

• Generally considered a collection of classes and properties

• Files can contain any combination of instances, classes, and properties

Page 16: An Introduction To  The Semantic Web

16

Common Ontologies

• Dublin Core• Word Net

Page 17: An Introduction To  The Semantic Web

17

Exercise 1

• List 10 things about yourself– Demographic info, job, age, personal info – whatever you like

Page 18: An Introduction To  The Semantic Web

18

Syntax: RDF/XML

Page 19: An Introduction To  The Semantic Web

19

•Using rdf:about

• To describe a resource:– <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”>

• Ending a description– <rdf:Description rdf:about=“ http://www.example.com/example.rdf#foo”></rdf:Description>

– <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”/>

Page 20: An Introduction To  The Semantic Web

20

Using rdf:ID

• rdf:ID is a local definition instead of a global one– <rdf:Description rdf:about=“foo”>

Page 21: An Introduction To  The Semantic Web

21

Properties

• To create a property<rdf:Property rdf:ID=“hasTitle”/>

<rdf:Property rdf:about=“http://www.example.com/employment.rdf#hasTitle”/>

Page 22: An Introduction To  The Semantic Web

22

Exercise 2

• Create descriptions of the things and properties for the attributes in your list of info– <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”>

<rdf:Property rdf:about=“http://www.example.com/employment.rdf#hasTitle”/>

Page 23: An Introduction To  The Semantic Web

23

Property With a literal (String)<rdf:Description rdf:ID=“Jen”>

<hasTitle>Professor</hasTitle>

</rdf:Description>

Page 24: An Introduction To  The Semantic Web

24

Property: With a resource as the object<rdf:Description rdf:ID=“Jen”>

<hasTitle rdf:resource=“http://www.example.com/employment.rdf#Professor”/>

</rdf:Description>

OR

• <rdf:Description rdf:ID=“Jen”>– <hasTitle rdf:resource=“#Professor”/>

• </rdf:Description>

Page 25: An Introduction To  The Semantic Web

25

Striping

<rdf:Description> <ex:editor> <rdf:Description> <ex:homePage> <rdf:Description> </rdf:Description> </ex:homePage> </rdf:Description> </ex:editor></rdf:Description>

Page 26: An Introduction To  The Semantic Web

26

Benefits

• Anyone can talk about any other resource (using rdf:about)

• Allows for annotation and expansion of existing resources

• New statements are joined into the graph

Page 27: An Introduction To  The Semantic Web

27

RDF Schema

Page 28: An Introduction To  The Semantic Web

28

Purpose of RDF Schema

• The purpose of RDF Schema is to provide an XML vocabulary to:– express classes and their (subclass) relationships.

– define properties and associate them with classes.

• The benefit of an RDF Schema is that it facilitates inferencing on your data, and enhanced searching.

Page 29: An Introduction To  The Semantic Web

29

Schema and Inference

• With definitions of classes, domains, and ranges, information about a resource that is not explicit can be inferred from the data

Page 30: An Introduction To  The Semantic Web

30

RDFS Classes

• Classes are categories into which resources can be grouped

• Members of classes are instances• subClasses create a hierarchy of classes

• Multiple inheritance is allowed

Page 31: An Introduction To  The Semantic Web

31

Properties

• RDFS adds domains and ranges– Limit what types of objects can be the subject of a property and what types can be the object

• SubProperty adds inheritance to properties– E.g. hasMother is a SubProperty of hasParent

Page 32: An Introduction To  The Semantic Web

32

Multiple Domains and Ranges

• Multiple domains or ranges on a property are treated as intersection

• Example: the property hasMother has a range of Female and also a range of Parent. That means the object of the property must be both a Parent and Female

Page 33: An Introduction To  The Semantic Web

33

Mapping and Aggregability

• Instances of the same class can easily be aggregated from separate files

• Using proper inferences, an instance does not need to be created as the proper type

• Example: Find all the Females– Jen is a Female– Irene is a Parent– Jen hasMother Irene– We now know Irene is a Female because all objects of hasMother must be female

Page 34: An Introduction To  The Semantic Web

34

Other Additions

• Rdfs:Container, a super class of the RDF containers

• Labels and comments– rdfs:label - commonly used to give a real-world name to the resource being described

– rdfs:comment - can be any text that you want to relate to the resource

Page 35: An Introduction To  The Semantic Web

35

Web Ontology Language (OWL)

Page 36: An Introduction To  The Semantic Web

36

Foundations

• XML• RDF• RDFS• DAML+OIL• OWL

Page 37: An Introduction To  The Semantic Web

37

OWL

• Three Species– OWL Lite– OWL DL– OWL Full

Page 38: An Introduction To  The Semantic Web

38

Equality

• equivalentClass• equivalentProperty• sameAs• differentFrom• allDifferent

Page 39: An Introduction To  The Semantic Web

39

• ZipCode equivalentClass PostalCode

• If zip code and postal code are supposed to be different - e.g. zip is for american addresses and postal is for foreign ones - then we can say they are different

• ZipCode differentFrom PostalCode<owl:Class rdf:ID=“ZipCode”><owl:differentFrom rdf:resource=“http://example.com/ont.owl#PostalCode/>

</owl:Class>

Example

Page 40: An Introduction To  The Semantic Web

40

Property Characteristics

• inverseOf– hasParent is the inverseOf hasChild

• TransitiveProperty– E.g. - ancestorOf - if Bob is an ancestorOf Joe and Joe is an ancestorOf Fred, then Bob is an ancestorOf Fred

• SymmetricProperty– E.g. if Tom is marriedTo Michelle, then Michelle is marriedTo Tom

• FunctionalProperty (unique value)– Wine hasMaker - hasMaker is functional (there can be only one)

• InverseFunctionalProperty – The inverse of a functional property - makesWine is the inverse of hasMaker and is an inverseFunctionalProperty

Page 41: An Introduction To  The Semantic Web

41

Restrictions

• Property Type Restrictions– allValuesFrom

• The hasMother property has allValuesFrom the class Woman

– someValuesFrom• The hasChild property has someValuesFrom the class Woman

• Restricted Cardinality (can be 0 or 1 in Lite)– minCardinality– maxCardinality– Cardinality

Page 42: An Introduction To  The Semantic Web

42

Local Restrictions on Property Ranges

• Instead of setting a range for a property, each class can have its own range

• E.g. The range of eats for vegetarians is different than for non-vegetarians

• Done with subclasses and a restriction<owl:Class rdf:ID="Vegetarian">

<rdfs:subClassOf><owl:Restriction> <owl:onProperty rdf:resource="#eats"/> <owl:allValuesFrom

rdf:resource="#VegetarianFood"/>

</owl:Restriction> </rdfs:subClassOf>

Page 43: An Introduction To  The Semantic Web

43

OWL DL and Full

Page 44: An Introduction To  The Semantic Web

44

Combinations

• unionOf (uses ParseType)– E.g. European Union Citizenship is the unionOf the citizenship of the member states

• intersectionOf (uses ParseType)– E.g. Fire engines are found in the intersection of RedThings and Trucks

• complementOf (used like subClassOf)– E.g. the complementOf livingThings are all things that are non-living

• disjointWith (used like subClassOf)– E.g. Man and Woman are disjoint classes<owl:Class rdf:ID=“Man”/><owl:Class rdf:ID=“Woman”>

<owl:disjointWith rdf:resource=”#Man”/></owl:Class>

Page 45: An Introduction To  The Semantic Web

45

Intersection Example

<owl:Class><owl:intersectionOf rdf:parseType="Collection">

<owl:Class><owl:equivalentClass

rdf:resource="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#Food-Beverage-and-Tobacco-Products"/>

</owl:Class>

<owl:Class><owl:equivalentClass

rdf:resource="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#Meat"/>

</owl:Class></owl:intersectionOf>

</owl:Class>

Page 46: An Introduction To  The Semantic Web

46

ComplementOf Example

<owl:Class>

<owl:intersectionOf><owl:Class rdf:resource=”#Food"/><owl:Class>

<owl:complementOf> <owl:Class rdf:resource="#Meat"/></owl:complementOf>

</owl:Class>

</owl:intersectionOf ></owl:Class>