Question: Which location is Montgomery County relative to (the one whose postal code is 20901–20908) that shares a border with Prince George's County?
Choices: south-southwest
north-northwest
west-northwest
northwest
southwest
east
southeast
south
west
northeast
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Montgomery County" . ?e_1 <postal_code> ?pv . ?pv <pred:value> "20901–20908" . ?e_2 <pred:name> "Prince George's County" . ?e_1 <shares_border_with> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <shares_border_with> ; <pred:fact_t> ?e_2 ] <direction_relative_to_location> ?qpv .  }
Program:
function: Find
inputs: Montgomery County
function: FilterStr
dependencies: 0
inputs: postal code
20901–20908
function: Find
inputs: Prince George's County
function: QueryRelationQualifier
dependencies: 1
2
inputs: shares border with
direction relative to location
Answer: southeast