Question: How many counties there are in California (the one that is the narrative location of Walk the Line) or whose population is less than 9600?
Choices:
33
34
35
36
37
38
39
40
41
42
Answer: 40
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of California" .  { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "California" . ?e_2 <narrative_location> ?e_1 . ?e_2 <pred:name> "Walk the Line" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "9600"^^xsd:double ) .  } }
Program:
function: Find
inputs: Walk the Line
function: Relate
dependencies: 0
inputs: narrative location
forward
function: Find
inputs: California
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: county of California
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
9600
<
function: FilterConcept
dependencies: 7
inputs: county of California
function: Or
dependencies: 5
8
function: Count
dependencies: 9