Question: How many musical instruments are either played by John Mayer, who plays the mandolin, or are different from the Appalachian dulcimer?
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> "musical instrument" .  { ?e_1 <instrument> ?e . ?e_1 <pred:name> "John Mayer" . ?e_1 <instrument> ?e_2 . ?e_2 <pred:name> "mandolin" .  } UNION { ?e <different_from> ?e_1 . ?e_1 <pred:name> "Appalachian dulcimer" .  } }
Program:
function: Find
inputs: mandolin
function: Relate
dependencies: 0
inputs: instrument
backward
function: Find
inputs: John Mayer
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: instrument
forward
function: FilterConcept
dependencies: 4
inputs: musical instrument
function: Find
inputs: Appalachian dulcimer
function: Relate
dependencies: 6
inputs: different from
backward
function: FilterConcept
dependencies: 7
inputs: musical instrument
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 1