QUERIES

SPARQL Results

We have created 12 competency questions with the intention of exploring some of the themes considered in our ontology, including questions related to characters, editions, lines of the text and the literary works cited by Dante. We obtained the results by querying the graph using Blazegraph. The following examples show how to exploit the knowledge graph with SPARQL.

CQ1

Which "Girone" of hell does Canto V refer to?

PREFIX divo:http://divo.github.io/

select ?Place

where { divo:InfV divo:refers_to ?Place.}

CQ2

What are the lines in which Paolo and Francesca are involved?

PREFIX divo:http://divo.github.io/

select ?Line

where { ?Line divo:related_character divo:PaoloSoul.

?Line divo:related_character divo:FrancescaSoul.}

CQ3

What are the fictional characters mentioned in the text?

PREFIX divo:http://divo.github.io/

select distinct ?FictionalCharacter

where { divo:InfV divo:has_line ?Line.

?Line divo:related_character ?FictionalCharacter.}

CQ4

What person inspired Paolo's soul?

PREFIX divo:http://divo.github.io/

select ?Agent

where { ?Agent divo:has_inspired divo:PaoloSoul.}

CQ5

What is Dante's identifier?

PREFIX divo:http://divo.github.io/

select ?x

where { divo:Dante divo:identifier ?x.}

CQ6

What is the character that is mentioned most times?

PREFIX divo:http://divo.github.io/

select ?Agent (COUNT(?Line) as ?Agent_count)

where {?Line divo:related_character ?Agent.}

GROUP BY ?Agent

ORDER BY DESC(?Agent_count)

LIMIT 1

CQ7

Which lines refer to Aeneid?

PREFIX divo:http://divo.github.io/

select ?Line

where {?Line divo:related_to ?LiteraryReference.

divo:Eneide divo:contains ?LiteraryReference.}

CQ8

What are the literary works related to Canto V?

PREFIX divo:http://divo.github.io/

select distinct ?LiteraryWork

where {?Line divo:related_to ?LiteraryReference.

?LiteraryWork divo:contains ?LiteraryReference}

CQ9

Who was the author of
the text "Historiarum adversus paganos libri septem"?

PREFIX divo:http://divo.github.io/

select ?Agent

where {divo:HistoriarumAdversus
PaganosLibriSeptem
divo:created_by ?Agent.}

CQ10

Which lines evoke the Divina Commedia itself?

PREFIX divo:http://divo.github.io/

select ?Line

where{ {?Line divo:related_to ?LiteraryReference.

divo:CanticaPurgatorio divo:contains ?LiteraryReference.}

UNION

{ ?Line divo:related_to ?LiteraryReference.

divo:CanticaParadiso divo:contains ?LiteraryReference.}

UNION

{?Line divo:related_to ?LiteraryReference.

divo:CanticaInferno divo:contains ?LiteraryReference.}}

CQ11

What are the editions chosen to analyze the Canto V?

PREFIX divo:http://divo.github.io/

select ?Edition

where { divo:DivinaCommedia divo:has_edition ?Edition.}

CQ12

What are the comments to the lines referring to Minos?

PREFIX divo:http://divo.github.io/

select ?Commentary

where {?Line divo:related_character divo:Minosse.

?Line divo:has_commentary ?Commentary.}