Question: How many ice hockey teams are headquartered in Vancouver (the one that is the formation location of Lions Gate Entertainment) or include John Madden (the one that was born in Barrie) as the member ?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 5
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "ice hockey team" .  { ?e <headquarters_location> ?e_1 . ?e_1 <pred:name> "Vancouver" . ?e_2 <location_of_formation> ?e_1 . ?e_2 <pred:name> "Lions Gate Entertainment" .  } UNION { ?e_1 <member_of_sports_team> ?e . ?e_1 <pred:name> "John Madden" . ?e_1 <place_of_birth> ?e_2 . ?e_2 <pred:name> "Barrie" .  } }
Program:
function: Find
inputs: Lions Gate Entertainment
function: Relate
dependencies: 0
inputs: location of formation
forward
function: Find
inputs: Vancouver
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: headquarters location
backward
function: FilterConcept
dependencies: 4
inputs: ice hockey team
function: Find
inputs: Barrie
function: Relate
dependencies: 6
inputs: place of birth
backward
function: Find
inputs: John Madden
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: member of sports team
forward
function: FilterConcept
dependencies: 10
inputs: ice hockey team
function: Or
dependencies: 5
11
function: Count
dependencies: 12