Question: How many republics preceded Peru or have a population size different from 420000000?
Choices:
35
36
37
38
39
40
41
42
43
44
Program:
function: Find
inputs: Peru
function: Relate
dependencies: 0
inputs: followed by
backward
function: FilterConcept
dependencies: 1
inputs: republic
function: FindAll
function: FilterNum
dependencies: 3
inputs: population
420000000
!=
function: FilterConcept
dependencies: 4
inputs: republic
function: Or
dependencies: 2
5
function: Count
dependencies: 6
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "republic" .  { ?e <followed_by> ?e_1 . ?e_1 <pred:name> "Peru" .  } UNION { ?e <population> ?pv . ?pv <pred:unit> "1" . ?pv <pred:value> ?v . FILTER ( ?v != "420000000"^^xsd:double ) .  } }
Answer: 35