2. Key Idea
• Make current search engines more “semantic” / “intelligent”
3. Examples
• When searching for “laptop”, then one is looking for
laptops or synonyms / related concepts (such as
“notebook”), but also for special kinds of laptops that
are not synonyms / related concepts, such as e.g.
IBM/Lenovo ThinkPads.
• When searching for Web pages about the first
president of the USA, “Washington”, semantic
annotations and background knowledge allow us to
restrict our search to Web pages that are actually
about Washington as the name of the president.
4. Semantic Annotations
• We assume semantic annotations to standard
Web pages and to objects on standard Web
pages:
• user-defined: starting to be widely available for a
large class of Web resources, especially with the
Web 2.0;
• automatically learned from the Web pages and
the objects to be annotated;
• automatically extracted from Web pages via user-
defined rules (i.e., mapping Web pages/objects to
an ontological knowledge base).
5. Example
• A Web page i1 may contain information about
a Ph.D. student i2, called Mary, and two of her
papers, namely, a conference paper i3 entitled
“Semantic Web search" and a journal paper i4
entitled “Semantic Web search engines" and
published in 2008.
6. Example (Cont…)
• Annotation for the Web page encodes that it
mentions Mary and the two papers:
Ai1 ={contains(i1, i2), contains(i1, i3),
contains(i1, i4)}
• Annotation for Mary may encode that she is a
Ph.D. student with the name Mary and the author
of the papers i3 and i4:
Ai2 ={PhDStudent(i2), name(i2, “mary"),
isAuthorOf(i2, i3), isAuthorOf(i2, i4)}
7. Example (Cont…)
• Annotation for the paper i3 may encode that i3 is
a conference paper and has the title “Semantic
Web search":
Ai3 ={ConferencePaper(i3), title(i3, “Semantic
Web search")}
• Annotation for the paper i4 may encode that i4 is
a journal paper, authored by Mary, has the title
“Semantic Web search engines", was published in
2008, and has the keyword “RDF”:
9. Inference Engine
• Using a background ontology, these semantic
annotations are then further enhanced in an
offline inference step, where the Inference Engine
adds all properties that can be deduced / induced
from the semantic annotations and the ontology.
• The resulting (completed) semantic annotations
are then published as Web pages, so that they
can be searched by standard Web search engines.
10. Inference Engine
• An ontology may contain the knowledge that
all journal and conference papers are also
articles, that conference papers are not journal
papers, and that “is author of” is the inverse
relation to “has author”, which is formally
expressed by the axioms.
11. Inference Engine
• Using this ontological background knowledge,
we can derive from the above annotations
that the two papers i3 and i4 are also articles,
and are both authored by Mary.
12. Inference Engine
• These searchable completed semantic annotations of (objects
on) standard Web pages are published as HTML Web pages
with pointers to the respective object pages.
13. Query Evaluator
• The Query Evaluator reduces each Semantic Web
search query in an online step to a sequence of
standard Web search queries on standard Web
and annotation pages, which are then processed
by a standard Web Search Engine, assuming
standard Web and annotation pages are
appropriately indexed.
• The Query Evaluator also collects the results and
re-transforms them into a single answer which is
returned to the user
14. Example
• Semantic Web search query, one may ask for all Ph.D. students
who have published an article in 2008 with RDF as a keyword,
which is formally expressed as follows:
• This query is transformed into the two queries Q1 =
PhDStudent AND isAuthorOf and Q2 = Article AND
“yearOfPublication 2008” AND “keyword RDF”, which are both
submitted to a standard Web search engine. The result of the
original query Q is then constructed from the results of the
two queries Q1 and Q2.
15. Semantic Web Languages
• Resource Description Framework (RDF)
– RDF is a language (XML syntax + semantics) for
representing metadata
– for describing the semantics of information in a
machine- accessible way
• RDF Schema (RDFS) extends RDF with “schema
vocabulary”
– Class, Property
– type, subClassOf, subPropertyOf
– range, domain
– RDFS is a very simple ontology language
16. The RDF Data Model
• Statements are (subject, predicate, object) triples:
(FAcosta, hasWritten, “Research Methods in IT”)
Can be represented as a graph:
• Statements describe properties of resources. A
resource is any object that can be pointed to by a
URI:Properties themselves are also resources (URIs)
FAcosta
hasWritten
subject object
predicate
Research
Methods in IT
17. Uniform Resource Identifier - URI
• "The generic set of all names/addresses that are short
strings that refer to resources"
– URLs (Uniform Resource Locators) are a particular type of
URI, used for resources that can be accessed on the WWW
(e.g., web pages)
– Accessing resource in a machine-understandable format
using a URI
• In RDF, URIs typically look like “normal” URLs, often
with fragment identifiers to point at specific parts of a
document:
• Example: http://ks.strathmore.edu/example/#facosta
– Shorthand notation strath:facosta
19. RDF Syntax
• RDF has an XML syntax
– Every Description element describes a resource
– Every attribute or nested element inside a Description is a
property of that Resource
<rdf:Description rdf:about="http://ks.strathmore.edu/example/facosta">
<homePage rdf:resource="http://www.strathmore.edu/lecturers/facosta"/>
<hasName>Freddie Acosta</strath:hasName>
<email rdf:resource="mailto:facosta@strathmore.edu"/>
<hasWritten rdf:resource=“strath:IT2145"/>
</rdf:Description>
<rdf:Description rdf:about="http://ks.strathmore.edu/example/IT2145">
<Title>Problem Based Learning Methodology</Title>
</rdf:Description>
20. 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”/>
21. Using rdf:ID
• rdf:ID is a local definition instead of a global
one
– <rdf:Description rdf:ID=“foo”>
22. Properties
• To create a property
<rdf:Property rdf:ID=“hasTitle”/>
<rdf:Property
rdf:about=“http://www.example.com/employment.rdf#ha
sTitle”/>
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. 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 (RDFS)
• RDF gives a language for meta data annotation, and
a way to write it down in XML, but it does not
provide any way to structure the annotations
• RDF Schema augments RDF to allow you to define
vocabulary terms and the relations between those
terms
– it gives “extra meaning” to particular RDF predicates
and resources
– e.g.
• Classes and properties
• Sub/super-classes (and properties i.e. type, subClassOf, subPropertyOf)
• Range and domain (of properties)
• These terms are the RDF Schema building blocks
(constructors) used to create vocabularies.
28. RDF Schema terms
– Class
– Property
– type
– subClassOf
– range
– domain
• These terms are the RDF Schema building blocks (constructors) used to create
vocabularies:
<Person,type,Class>
<hasColleague,type,Property>
<Professor,subClassOf,Person>
<Carole,type,Professor>
<hasColleague,range,Person>
<hasColleague,domain,Person>
29. RDFS Classes
• Classes are categories into which resources
can be grouped
• Members of classes are instances
• subClasses create a hierarchy of classes
30. 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
E.g.
<Species,type,Class>
<Lion,type,Species>
• Properties can themselves have properties
E.g.
<hasDaughter,subPropertyOf,hasChild>
<hasDaughter,type,familyProperty>
• Datatype properties (connects an instance of a class to a literal value)
• Object properties (connect instances of classes)
31. 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
32. Other Additions
• 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
33. RDF Summary
• RDF - The Resource Description Framework allows
us to describe resources by specifying their
properties and property values.
– RDF Statements are triples of the form (Subject,
Predicate, Object)
– A set of RDF triples forms an RDF Graph
• RDF Schema semantically extends RDF by
providing a means to describe RDF Vocabularies.
• RDF and RDF Schema provide basic capabilities
for describing vocabularies that describe
resources.
37. The Three Species of OWL
• OWL-Full - No restrictions on how/where language
constructs can be used. The union of OWL and RDF
Schema. OWL-Full is not decidable.
• OWL-DL - Restricted version of OWL-Full.
Corresponds to a description logic. Certain
restrictions on how/where language constructs can
be used in order to guarantee decidability.
• OWL-Lite - A subset of OWL-DL. The simplest and
easiest to implement of the three species.
38. Components of an OWL Ontology
• Individuals
• Classes
• Properties
Research
Methods in IT
Philippines
Clement
Acosta
Advanced
Accounting
Kenya
UK
isCitizenOf
hasColleague
hasWritten
Employee
Publication
Country
39.
40. 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>
41. Restrictions
• Property Type Restrictions
– allValuesFrom
• The hasMother property has allValuesFrom the class Woman
– someValuesFrom
• The hasChild property has someValuesFrom the class Woman
42.
43. 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
44. 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>
…
45. Example
• 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>