Question: How many regions of Italy share a border with Liguria or are the twinned administrative body of Bethlehem (which is also the twinned administrative body of Cologne)?
Choices:
2
3
4
5
6
7
8
9
10
11
Program:
function: Find
inputs: Liguria
function: Relate
dependencies: 0
inputs: shares border with
forward
function: FilterConcept
dependencies: 1
inputs: region of Italy
function: Find
inputs: Cologne
function: Relate
dependencies: 3
inputs: twinned administrative body
forward
function: Find
inputs: Bethlehem
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: twinned administrative body
forward
function: FilterConcept
dependencies: 7
inputs: region of Italy
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> "region of Italy" .  { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Liguria" .  } UNION { ?e_1 <twinned_administrative_body> ?e . ?e_1 <pred:name> "Bethlehem" . ?e_2 <twinned_administrative_body> ?e_1 . ?e_2 <pred:name> "Cologne" .  } }
Answer: 5