Question: What North Carolina county shares a border with the administrative territorial entity whose capital is Spartanburg?
Choices:
Gaston County
Buncombe County
Brunswick County
Wake County
Polk County
Davidson County
Franklin County
Guilford County
Mecklenburg County
Greenville County
Program:
function: Find
inputs: Spartanburg
function: Relate
dependencies: 0
inputs: capital of
forward
function: FilterConcept
dependencies: 1
inputs: administrative territorial entity
function: Relate
dependencies: 2
inputs: shares border with
forward
function: FilterConcept
dependencies: 3
inputs: county of North Carolina
function: What
dependencies: 4
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of North Carolina" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "administrative territorial entity" . ?e_2 <capital_of> ?e_1 . ?e_2 <pred:name> "Spartanburg" .   }
Answer: Polk County