Question: How many Oregon counties are located in or next to the Pacific Ocean or contain Portland (which contains Reed College)?
Choices: 3
4
5
6
7
8
9
10
11
12
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Oregon" .  { ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Pacific Ocean" .  } UNION { ?e_1 <located_in_the_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Portland" . ?e_2 <located_in_the_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "Reed College" .  } }
Program:
function: Find
inputs: Pacific Ocean
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 1
inputs: county of Oregon
function: Find
inputs: Reed College
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
forward
function: Find
inputs: Portland
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: located in the administrative territorial entity
forward
function: FilterConcept
dependencies: 7
inputs: county of Oregon
function: Or
dependencies: 2
8
function: Count
dependencies: 9
Answer: 4