Question: How many cities are the origin of the name York County (which is located in Maine)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" . ?e_1 <named_after> ?e . ?e_1 <pred:name> "York County" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Maine" .   }
Program:
function: Find
inputs: Maine
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: Find
inputs: York County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: named after
forward
function: FilterConcept
dependencies: 4
inputs: city
function: Count
dependencies: 5