Question: How many empires border Egypt that has a diplomatic relation with Malaysia or have a population more than 92000?
Choices:
0
1
2
3
4
5
6
7
8
9
Program:
function: Find
inputs: Malaysia
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: Find
inputs: Egypt
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: empire
function: FindAll
function: FilterNum
dependencies: 6
inputs: population
92000
>
function: FilterConcept
dependencies: 7
inputs: empire
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> "empire" .  { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Egypt" . ?e_1 <diplomatic_relation> ?e_2 . ?e_2 <pred:name> "Malaysia" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v > "92000"^^xsd:double ) .  } }
Answer: 3