Question: How many works of literature are set in Russia or penned by J. K. Rowling?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 8
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "literary work" .  { ?e <narrative_location> ?e_1 . ?e_1 <pred:name> "Russia" .  } UNION { ?e <author> ?e_1 . ?e_1 <pred:name> "J. K. Rowling" .  } }
Program:
function: Find
inputs: Russia
function: Relate
dependencies: 0
inputs: narrative location
backward
function: FilterConcept
dependencies: 1
inputs: literary work
function: Find
inputs: J. K. Rowling
function: Relate
dependencies: 3
inputs: author
backward
function: FilterConcept
dependencies: 4
inputs: literary work
function: Or
dependencies: 2
5
function: Count
dependencies: 6