Question: I need to know the historic county of England that is the origin of the name the administrative territorial entity that has Middletown as the capital.
Choices:
Yorkshire
Sussex
Bhubaneswar
Cebu
Aladdin
Middlesex
Loretta Lynn
Tom Jones
Murali
Cambridgeshire
Answer: Middlesex
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "historic county of England" . ?e_1 <named_after> ?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> "Middletown" .   }
Program:
function: Find
inputs: Middletown
function: Relate
dependencies: 0
inputs: capital of
forward
function: FilterConcept
dependencies: 1
inputs: administrative territorial entity
function: Relate
dependencies: 2
inputs: named after
forward
function: FilterConcept
dependencies: 3
inputs: historic county of England
function: What
dependencies: 4