Question: What capital sits in or adjacent to the Mediterranean Sea?
Choices:
Algiers
Cape Town
Strasbourg
Tallinn
Beirut
Gibraltar
Tripoli
Sardinia
Aegean Sea
Kiev
Program:
function: Find
inputs: Mediterranean Sea
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 1
inputs: capital
function: What
dependencies: 2
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "capital" . ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Mediterranean Sea" .   }
Answer: Beirut