Question: Richard Wagner (the one whose date of birth is 1813-05-22) died in Venice (the one that is the twinned administrative body of Yerevan), to what country does it belong?
Choices:
Taiwan
Russia
Weimar Republic
Kingdom of Italy
Denmark
Slovakia
English
Albania
Romania
Kenya Colony
Answer: Kingdom of Italy
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Richard Wagner" . ?e_1 <date_of_birth> ?pv . ?pv <pred:date> "1813-05-22"^^xsd:date . ?e_2 <pred:name> "Venice" . ?e_2 <twinned_administrative_body> ?e_3 . ?e_3 <pred:name> "Yerevan" . ?e_1 <place_of_death> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <place_of_death> ; <pred:fact_t> ?e_2 ] <country> ?qpv .  }
Program:
function: Find
inputs: Richard Wagner
function: FilterDate
dependencies: 0
inputs: date of birth
1813-05-22
=
function: Find
inputs: Yerevan
function: Relate
dependencies: 2
inputs: twinned administrative body
backward
function: Find
inputs: Venice
function: And
dependencies: 3
4
function: QueryRelationQualifier
dependencies: 1
5
inputs: place of death
country