Question: Which has more people, Dakar, capital of Senegal, or Plymouth whose area is 79.29 square kilometres?
Choices:
Kilkenny
Dundee
Plymouth
Dakar
Bergen
Santo Domingo
Abidjan
Cork
Trieste
Kingston
Program:
function: Find
inputs: Senegal
function: Relate
dependencies: 0
inputs: capital of
backward
function: Find
inputs: Dakar
function: And
dependencies: 1
2
function: Find
inputs: Plymouth
function: FilterNum
dependencies: 4
inputs: area
79.29 square kilometre
=
function: SelectBetween
dependencies: 3
5
inputs: population
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Dakar" . ?e <capital_of> ?e_1 . ?e_1 <pred:name> "Senegal" . } UNION { ?e <pred:name> "Plymouth" . ?e <area> ?pv_1 . ?pv_1 <pred:unit> "square kilometre" . ?pv_1 <pred:value> "79.29"^^xsd:double . } ?e <population> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Plymouth