Document 12930102

advertisement
CS4140
UNIVERSITY OF WARWICK
Department of Computer Science
MEng/MSc Year Summer Examinations: 2015/16
Semantic Web
MODEL EXAM PAPER
Time allowed: 2 hours.
Answer FOUR questions.
Read carefully the instructions on the answer book and make sure that the particulars required are
entered on each answer book.
Calculators are not allowed.
(continued)
Page 1 of 6
CS4140
1. Semantic Web Generalities, Applications Semantic Web
(a) Consider the following statements, and comment on their meaning. Give also an example for
each.
(i) HTML is concerned with the 'look' only.
[2]
(ii) XML is concerned with the structure and localised tags.
[4]
(iii) RDF is concerned with relationships.
[2]
(iv) RDFS extends RDF with a specific vocabulary.
[2]
(v) OWL extends RDFS by constructing classes and domain terms.
[5]
(b) Which RDF features are avoided in Linked data, and why? Give an example of each of these
features (you can use (Subject, Predicate, Object) notation, for simplification, or any other notation
you are familiar with).
[10]
2. RDF, RDFS
(a) Consider the RDF snippets below. What kind of RDF structure do they showcase? Define the
terms encountered. Draw the equivalent of these RDF snippets in the RDF graphical language.
(i)
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:s="http://example.org/students/vocab#">
<rdf:Description rdf:about="http://example.org/courses/6.001">
<s:students>
<rdf:Bag>
<rdf:li rdf:resource="http://example.org/students/Amy"/>
<rdf:li
rdf:resource="http://example.org/students/Mohamed"/>
<rdf:li
rdf:resource="http://example.org/students/Johann"/>
<rdf:li
rdf:resource="http://example.org/students/Maria"/>
<rdf:li
rdf:resource="http://example.org/students/Phuong"/>
</rdf:Bag>
</s:students>
</rdf:Description>
</rdf:RDF>
[4]
(continued)
Page 2 of 6
CS4140
(ii)
<rdf:Description rdf:about="http://www.recshop.fake/cd/Beatles">
<cd:artist>
<rdf:Seq>
<rdf:li>George</rdf:li>
<rdf:li>John</rdf:li>
<rdf:li>Paul</rdf:li>
<rdf:li>Ringo</rdf:li>
</rdf:Seq>
</cd:artist>
</rdf:Description>
[4]
(iii)
<rdf:Description rdf:about="http://www.recshop.fake/cd/Beatles">
<cd:format>
<rdf:Alt>
<rdf:li>CD</rdf:li>
<rdf:li>Record</rdf:li>
<rdf:li>Tape</rdf:li>
</rdf:Alt>
</cd:format>
</rdf:Description>
[4]
(iv)
<rdf:Description rdf:about="http://example.org/courses/6.001">
<voc:students rdf:parseType="Collection">
<rdf:Description rdf:about="http://example.org/students/Amy"/>
<rdf:Description rdf:about="http://example.org/students/Mohamed"/>
<rdf:Description rdf:about="http://example.org/students/Johan"/>
</cd:artist>
</rdf:Description>
[6]
(b) Translate into (brief) natural language the following RDF snippets:
(i)
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/Empire Burlesque"
cd:artist="Bob Dylan" cd:country="USA"
cd:company="Columbia" cd:price="10.90"
cd:year="1985" />
</rdf:RDF>
[3]
(continued)
Page 3 of 6
CS4140
(ii)
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base="http://www.transport.fake/trains#">
<rdf:Description rdf:ID="train">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdfschema#Class"/>
</rdf:Description>
<rdf:Description rdf:ID="shinkansen">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdfschema#Class"/>
<rdfs:subClassOf rdf:resource="#train"/>
</rdf:Description>
</rdf:RDF>
[1]
(c) Write the RDF code snippet in (b)(ii) above in its abbreviated form.
[3]
3. SPARQL
(a) Suppose that an RDF model represents information about real world entities of unknown types.
The entities can be persons, locations, books, monuments, organizations, etc.
(i) Write a SPARQL query to return all possible information about all kinds of
entities.
[1]
(ii) Write a SPARQL query that can return at most 5 triples representing information.
[1]
(iii) Consider that one of the previous queries has shown that the information on the queried
RDF document is about books, their authors, their titles, their publisher, as defined by the
standard vocabulary from http://purl.org/dc/elements/1.1/. Write a SPARQL
query that can return the author, title and publishing house of a book. Hint: Use relations
from the vocabulary, such as 'creator', 'title', 'publisher'.
[5]
(iv) Rewrite and extend the SPARQL query at 3a(iii) above, if we don't know for sure if the
publishing house and the date of publication is known, and we want to retrieve the author,
title, publishing house and date of publication of a book. Discuss briefly your syntax
choices. Hint: use relations from the standard vocabulary given in 3a(iii), including 'date'.
[6]
(continued)
Page 4 of 6
CS4140
(b) Consider the following SPARQL snippet:
SELECT ?a ?c
WHERE {?a ?b ?c .
?a ?d? ?c}
Rewrite the query twice, to show two ways of abbreviating multiple objects in a query. Explain
what is abbreviated at each rewrite, and why it can be abbreviated this way.
[6]
(c) Explain the constructs DESCRIBE and CONSTRUCT in SPARQL, by discussing the reason
why they were introduced, the output they can provide. Give an example for each, to illustrate your
explanation.
[6]
4. OWL, Ontology Development
(a) Answer the following questions:
(i) Why do we need to develop an ontology? Mention three reasons.
[3]
(ii) List the seven ontology design steps.
[7]
(iii) What is an ontology?
[3]
(b) Write the following example snippets of code in OWL or OWL2 (as appropriate) in the
OWL/XML syntax:
(i) An example of an individual.
[2]
(ii) An example of an object property.
[4]
.
(c) Explain in natural and mathematical language what the following OWL2 constructions mean.
Use also graphical representations.
(i) <owl:ReflexiveProperty rdf:ID="hasSameAge"/>
[3]
(ii) <owl:AssymmetricProperty rdf:ID="isThinnerThan"/>
[3]
(iii) <owl:ObjectProperty rdf:ID="buys">
[3]
<owl:propertyChainAxiom ref:parseType="Collection">
<owl:ObjectProperty rdf:about="#buys"/>
<owl:ObjectProperty rdf:about="#hasPart"/>
</owl:propertyChainAxiom>
</owl:ObjectProperty>
(continued)
Page 5 of 6
CS4140
5. Description Logic, Web 2.0
(a) Answer the following questions:
(i) What is description logics (DL), what does it allow and what are its advantages?
[3]
(ii) Based on the example below, explain reasoning (here, classification) in DL. Make sure to
explain all relations and symbols encountered in the example.
[3]
(iii) What is an A Box and what is a T Box in DL? Give an example of each.
[4]
(iv) What are classes and relations called in DL? What is subsumption in DL? Give an example
of each.
[6]
(b) Considering the comparison between Web 1.0 and Web 2.0, decide if Facebook is a Web 2.0 or
Web 1.0 platform. Exemplify your answers. Use four comparison.
[9]
6. User Modelling
(a) What is a User Modelling shell system, and what are its requirements?
[7]
(b) A bookstore is introducing a new user modelling system, based on the introversion/
extroversion cognitive style.
(i) Describe the cognitive style the company is introducing.
[2]
(ii) What kind of data (information type) is the bookstore storing about its users, to cater to this
learning style? How would this data be obtained? Exemplify each of your answers. Discuss pros
and cons of the different ways of obtaining data. (Hint: find four ways of data gathering.)
[13]
(iii) The bookstore additionally decides to maintain background information about each user (their
age, ethnicity, gender, job). What type of user modelling would be needed for such information?
Explain your answer. (Hint: using overlay modelling or free variables) Instantiate the user model
for Mary, an extrovert housewife of 23, of Hispanic origin.
[3]
(End)
Page 6 of 6
Download