Question: What California county shares a border with Kern County and is the residence of Ewan McGregor?
Choices:
Los Angeles County
San Diego County
Contra Costa County
Santa Barbara County
Alameda County
Solano County
Butte County
Inyo County
San Mateo County
Ventura County
Program:
function: Find
inputs: Kern County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: county of California
function: Find
inputs: Ewan McGregor
function: Relate
dependencies: 3
inputs: residence
forward
function: FilterConcept
dependencies: 4
inputs: county of California
function: And
dependencies: 2
5
function: What
dependencies: 6
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of California" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Kern County" .  ?e_2 <residence> ?e . ?e_2 <pred:name> "Ewan McGregor" .  }
Answer: Los Angeles County