Question: How many agents have origins in the House of Commons (the one whose official name is House of Commons) or have the residence of Donald Trump (the one that uses the language American English)?
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> "agent" .  { ?e_1 <separated_from> ?e . ?e_1 <pred:name> "House of Commons" . ?e_1 <official_name> ?pv . ?pv <pred:value> "House of Commons" .  } UNION { ?e_1 <residence> ?e . ?e_1 <pred:name> "Donald Trump" . ?e_1 <languages_spoken,_written_or_signed> ?e_2 . ?e_2 <pred:name> "American English" .  } }
Program:
function: Find
inputs: House of Commons
function: FilterStr
dependencies: 0
inputs: official name
House of Commons
function: Relate
dependencies: 1
inputs: separated from
forward
function: FilterConcept
dependencies: 2
inputs: agent
function: Find
inputs: American English
function: Relate
dependencies: 4
inputs: languages spoken, written or signed
backward
function: Find
inputs: Donald Trump
function: And
dependencies: 5
6
function: Relate
dependencies: 7
inputs: residence
forward
function: FilterConcept
dependencies: 8
inputs: agent
function: Or
dependencies: 3
9
function: Count
dependencies: 10
Answer: 1