Question: Tell me the republic that has diplomatic relations with Germany (the subject of the statement is relationships between Germany Niger)
Choices:
Sierra Leone
Niger
Colombia
Germany
Belarus
Tunisia
Mozambique
Zimbabwe
Namibia
Italy
Program:
function: Find
inputs: Germany
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: QFilterStr
dependencies: 1
inputs: statement is subject of
Germany-Niger relations
function: FilterConcept
dependencies: 2
inputs: republic
function: What
dependencies: 3
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "republic" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Germany" .  [ <pred:fact_h> ?e ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_1 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Germany-Niger relations" .  }
Answer: Niger