Question: What is the number of saxophones that are instruments used by John Coltrane or Ray Charles (who is famous for the keyboard instrument)?
Choices:
1
2
3
4
5
6
7
8
9
10
Program:
function: Find
inputs: John Coltrane
function: Relate
dependencies: 0
inputs: instrument
forward
function: FilterConcept
dependencies: 1
inputs: saxophone
function: Find
inputs: keyboard instrument
function: Relate
dependencies: 3
inputs: famous people
forward
function: Find
inputs: Ray Charles
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: instrument
forward
function: FilterConcept
dependencies: 7
inputs: saxophone
function: Or
dependencies: 2
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "saxophone" .  { ?e_1 <instrument> ?e . ?e_1 <pred:name> "John Coltrane" .  } UNION { ?e_1 <instrument> ?e . ?e_1 <pred:name> "Ray Charles" . ?e_2 <famous_people> ?e_1 . ?e_2 <pred:name> "keyboard instrument" .  } }
Answer: 3