Question: How many popular music forms comprise rock music or famously include hard rocker Joe Walsh?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "popular music" .  { ?e <part_of> ?e_1 . ?e_1 <pred:name> "rock music" .  } UNION { ?e <famous_people> ?e_1 . ?e_1 <pred:name> "Joe Walsh" . ?e_2 <famous_people> ?e_1 . ?e_2 <pred:name> "hard rock" .  } }
Program:
function: Find
inputs: rock music
function: Relate
dependencies: 0
inputs: part of
backward
function: FilterConcept
dependencies: 1
inputs: popular music
function: Find
inputs: hard rock
function: Relate
dependencies: 3
inputs: famous people
forward
function: Find
inputs: Joe Walsh
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: famous people
backward
function: FilterConcept
dependencies: 7
inputs: popular music
function: Or
dependencies: 2
8
function: Count
dependencies: 9
Answer: 3