Question: Which non-metro county is an administrative division of the Hampshire bordering Berkshire?
Choices:
Essex
Dorset
North Yorkshire
Hampshire
Gloucestershire
Cambridgeshire
Derbyshire
Nigeria
Kent
Devon
Program:
function: Find
inputs: Berkshire
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Hampshire
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: non-metropolitan county
function: What
dependencies: 5
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "non-metropolitan county" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Hampshire" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Berkshire" .   }
Answer: Hampshire