Question: What is the relationship between Union County (the one that shares border with New York City) and Somerset County (the one that shares border with Morris County?
Choices:
shares border with
family name
lyrics by
tributary
signatory
item operated
medical condition
drafted by
director of photography
home world
Program:
function: Find
inputs: New York City
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Union County
function: And
dependencies: 1
2
function: Find
inputs: Morris County
function: Relate
dependencies: 4
inputs: shares border with
backward
function: Find
inputs: Somerset County
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Union County" . ?e_3 <shares_border_with> ?e_1 . ?e_3 <pred:name> "New York City" . ?e_2 <pred:name> "Somerset County" . ?e_2 <shares_border_with> ?e_4 . ?e_4 <pred:name> "Morris County" . ?e_1 ?p ?e_2 .  }
Answer: shares border with