Question: How many cities in NJ comprise the twinned administrative body of Rio de Janeiro (the one that is the twin city of Durban) or comprise the population of under 1,4 million ?
Choices:
7
8
9
10
11
12
13
14
15
16
Program:
function: Find
inputs: Durban
function: Relate
dependencies: 0
inputs: twinned administrative body
forward
function: Find
inputs: Rio de Janeiro
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: twinned administrative body
backward
function: FilterConcept
dependencies: 4
inputs: city in New Jersey
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
1400000
<
function: FilterConcept
dependencies: 7
inputs: city in New Jersey
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> "city in New Jersey" .  { ?e <twinned_administrative_body> ?e_1 . ?e_1 <pred:name> "Rio de Janeiro" . ?e_2 <twinned_administrative_body> ?e_1 . ?e_2 <pred:name> "Durban" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v < "1400000"^^xsd:double ) .  } }
Answer: 15