Question: How many Florida counties are named after James K. Polk, or share a border with Florida's Marion County?
Choices:
4
5
6
7
8
9
10
11
12
13
Program:
function: Find
inputs: James K. Polk
function: Relate
dependencies: 0
inputs: named after
backward
function: FilterConcept
dependencies: 1
inputs: county of Florida
function: Find
inputs: Florida
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: Find
inputs: Marion County
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: shares border with
forward
function: FilterConcept
dependencies: 7
inputs: county of Florida
function: Or
dependencies: 2
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Florida" .  { ?e <named_after> ?e_1 . ?e_1 <pred:name> "James K. Polk" .  } UNION { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Marion County" . ?e_1 <located_in_the_administrative_territorial_entity> ?e_2 . ?e_2 <pred:name> "Florida" .  } }
Answer: 6