Question: How many North Carolina counties are in Virginia (a United States of America administrative division) or are an administrative division of North Carolina?
Choices:
8
9
10
11
12
13
14
15
16
17
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: Find
inputs: Virginia
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: located in the administrative territorial entity
backward
function: FilterConcept
dependencies: 4
inputs: county of North Carolina
function: Find
inputs: North Carolina
function: Relate
dependencies: 6
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 7
inputs: county of North Carolina
function: Or
dependencies: 5
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of North Carolina" .  { ?e <located_in_the_administrative_territorial_entity> ?e_1 . ?e_1 <pred:name> "Virginia" . ?e_2 <contains_administrative_territorial_entity> ?e_1 . ?e_2 <pred:name> "United States of America" .  } UNION { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "North Carolina" .  } }
Answer: 11