Question: How many Canadian provinces border the Northwest Territories or correspond with the subreddit PEI?
Choices:
3
4
5
6
7
8
9
10
11
12
Program:
function: Find
inputs: Northwest Territories
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: province of Canada
function: FindAll
function: FilterStr
dependencies: 3
inputs: subreddit
PEI
function: FilterConcept
dependencies: 4
inputs: province of Canada
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> "province of Canada" .  { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Northwest Territories" .  } UNION { ?e <subreddit> ?pv . ?pv <pred:value> "PEI" .  } }
Answer: 8