Introduction to Semantic Technologies Coursework: XML, RDF, Turtle

Verified

Added on  2022/08/24

|3
|258
|29
Homework Assignment
AI Summary
This document presents a complete solution to an assignment focused on semantic technologies. The assignment covers key concepts including XML document representation and XPath queries to extract specific data, such as recipe titles and details based on ingredients and nutritional information. It also includes an RDF document analysis, detailing its graph representation and corresponding Turtle code, illustrating how literary works and their metadata are structured semantically. Furthermore, the solution addresses queries related to the RDF data and its associated properties. The assignment assesses understanding of data representation, query languages, and semantic web technologies, providing a comprehensive overview of the subject matter.
Document Page
1. a. Tree representation
- recipes
- recipe
- title
- ingredient
- preparation
- step
- comment
- nutrition
1. b. XPath queries to find;
Title of all recipes
/recipes/recipe/title/
Titles of all recipes that use olive oil
/recipes/recipe/ingredient[@name="olive oil"]/title
Titles of all recipes that use olive oil
/recipes/recipe/nutrition[@calories<500]/title
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2a. Content description
The RDF document contains information about three literary works by Oscar Wilde;
The importance of Being Earnest, The Ballad of Reading Gaol and The Picture of
Dorian Gray.
Among the details the document elucidates include the type of the work i.e. either a
poem, play or a novel. The document also contains metadata with information about
the attributes used in describing each of the literary works.
2b. Graph representation of document
2c. Turtle code
The Picture of Dorian Gray
Novel
Oscar Wilde
The Ballad of Reading Gaol
Poem
The Importance of Being Earnest
Play
Document Page
3.a.
Sue
3.b.
Pete, 17
Sue, 21
John
3.c.
John , john@abc.com
Pete, pete@abc.com
10.
SELECT (count(distinct ?laureate) as ?nLaureate)
WHERE {
?laureate rdf:type nobel:Laureate .
SERVICE wikibase:label { bd:serviceParam wikibase:language
"en" . }
}
chevron_up_icon
1 out of 3
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]