Upload
bo-sears
View
29
Download
3
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
1
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/
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
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
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...
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
7
What are the basic units?
• URIs
• Triples– subject – predicate – object
• Ontology– Used for reasoning about data
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
9
How do we represent them?
• History– XML, SHOE, DAML, OIL, DAML+OIL
– RDF, RDFS, OWL
10
Standardization
• World Wide Web Consortium (W3C)• http://w3.org
11
Data looks like a graph
12
Classes
• Concepts• Hierarchies• Multiple Inheritance allowed
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)
14
Instances
• Instances of a class – The class is its type
• Properties are used on instances
• Can be of multiple types
15
Ontologies
• Generally considered a collection of classes and properties
• Files can contain any combination of instances, classes, and properties
16
Common Ontologies
• Dublin Core• Word Net
17
Exercise 1
• List 10 things about yourself– Demographic info, job, age, personal info – whatever you like
18
Syntax: RDF/XML
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”/>
20
Using rdf:ID
• rdf:ID is a local definition instead of a global one– <rdf:Description rdf:about=“foo”>
21
Properties
• To create a property<rdf:Property rdf:ID=“hasTitle”/>
<rdf:Property rdf:about=“http://www.example.com/employment.rdf#hasTitle”/>
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”/>
23
Property With a literal (String)<rdf:Description rdf:ID=“Jen”>
<hasTitle>Professor</hasTitle>
</rdf:Description>
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>
25
Striping
<rdf:Description> <ex:editor> <rdf:Description> <ex:homePage> <rdf:Description> </rdf:Description> </ex:homePage> </rdf:Description> </ex:editor></rdf:Description>
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
27
RDF Schema
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.
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
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
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
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
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
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
35
Web Ontology Language (OWL)
36
Foundations
• XML• RDF• RDFS• DAML+OIL• OWL
37
OWL
• Three Species– OWL Lite– OWL DL– OWL Full
38
Equality
• equivalentClass• equivalentProperty• sameAs• differentFrom• allDifferent
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
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
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
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>
…
43
OWL DL and Full
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>
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>
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>