Question: Which democracy shares a border with the democracy whose country is Liberia (the subject of this statement is Liberia–Sierra Leone border)?
Choices:
Italy
Sierra Leone
Tunisia
Germany
Bolivia
Namibia
Colombia
Liberia
France
Zimbabwe
Program:
function: Find
inputs: Liberia
function: Relate
dependencies: 0
inputs: country
backward
function: FilterConcept
dependencies: 1
inputs: democracy
function: Relate
dependencies: 2
inputs: shares border with
forward
function: QFilterStr
dependencies: 3
inputs: statement is subject of
Liberia–Sierra Leone border
function: FilterConcept
dependencies: 4
inputs: democracy
function: What
dependencies: 5
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "democracy" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "democracy" . ?e_1 <country> ?e_2 . ?e_2 <pred:name> "Liberia" .  [ <pred:fact_h> ?e_1 ; <pred:fact_r> <shares_border_with> ; <pred:fact_t> ?e ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Liberia–Sierra Leone border" .  }
Answer: Sierra Leone