Question: How many written works were directed by Lewis Gilbert (UK citizen) or report NYC as the narrative location ?
Choices:
3
4
5
6
7
8
9
10
11
12
Program:
function: Find
inputs: United Kingdom
function: Relate
dependencies: 0
inputs: country of citizenship
backward
function: Find
inputs: Lewis Gilbert
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: director
backward
function: FilterConcept
dependencies: 4
inputs: written work
function: Find
inputs: New York City
function: Relate
dependencies: 6
inputs: narrative location
backward
function: FilterConcept
dependencies: 7
inputs: written work
function: Or
dependencies: 5
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "written work" .  { ?e <director> ?e_1 . ?e_1 <pred:name> "Lewis Gilbert" . ?e_1 <country_of_citizenship> ?e_2 . ?e_2 <pred:name> "United Kingdom" .  } UNION { ?e <narrative_location> ?e_1 . ?e_1 <pred:name> "New York City" .  } }
Answer: 6