Question: What sovereign state has a diplomatic relation with Taiwan (the subject of this statement is Bosnia and Herzegovina–Taiwan relations) ?
Choices:
Nicaragua
Barbados
Kuwait
Cameroon
Switzerland
Kiribati
Cambodia
Bosnia and Herzegovina
Weimar Republic
Mexico
Program:
function: Find
inputs: Taiwan
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: QFilterStr
dependencies: 1
inputs: statement is subject of
Bosnia and Herzegovina–Taiwan relations
function: FilterConcept
dependencies: 2
inputs: sovereign state
function: What
dependencies: 3
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Taiwan" .  [ <pred:fact_h> ?e ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_1 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Bosnia and Herzegovina–Taiwan relations" .  }
Answer: Bosnia and Herzegovina