Question: How many Japanese prefectures are in Japan or occupy other than 2300000 square feet?
Choices:
5
6
7
8
9
10
11
12
13
14
Answer: 7
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "prefecture of Japan" .  { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Japan" .  } UNION { ?e <area> ?pv . ?pv <pred:unit> "square foot" . ?pv <pred:value> ?v . FILTER ( ?v != "2300000"^^xsd:double ) .  } }
Program:
function: Find
inputs: Japan
function: Relate
dependencies: 0
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 1
inputs: prefecture of Japan
function: FindAll
function: FilterNum
dependencies: 3
inputs: area
2300000 square foot
!=
function: FilterConcept
dependencies: 4
inputs: prefecture of Japan
function: Or
dependencies: 2
5
function: Count
dependencies: 6