Question: Gibraltar, demonym gibilterrine, is the capital of how many port cities?
Choices:
1
2
3
4
5
6
7
8
9
10
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "port city" . ?e <capital> ?e_1 . ?e_1 <pred:name> "Gibraltar" . ?e_1 <demonym> ?pv . ?pv <pred:value> "gibilterrine" .   }
Program:
function: Find
inputs: Gibraltar
function: FilterStr
dependencies: 0
inputs: demonym
gibilterrine
function: Relate
dependencies: 1
inputs: capital
backward
function: FilterConcept
dependencies: 2
inputs: port city
function: Count
dependencies: 3