Question: What capital is located in a sovereign state with diplomatic relations with Pakistan (Malaysia-Pakistan relations) ?
Choices:
Kuala Lumpur
Bucharest
Prague
Tamil
Strasbourg
Yerevan
Johor
Bangalore
Rome
Penang
Program:
function: Find
inputs: Pakistan
function: Relate
dependencies: 0
inputs: diplomatic relation
forward
function: QFilterStr
dependencies: 1
inputs: statement is subject of
Malaysia–Pakistan relations
function: FilterConcept
dependencies: 2
inputs: sovereign state
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: capital
function: What
dependencies: 5
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "capital" . ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "sovereign state" . ?e_2 <diplomatic_relation> ?e_1 . ?e_2 <pred:name> "Pakistan" . [ <pred:fact_h> ?e_2 ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_1 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Malaysia–Pakistan relations" .   }
Answer: Kuala Lumpur