Question: How many states of India belong to the country of India (that is the nation of Amritsar) and are an administrative division of India (that has a diplomatic relationship with Japan)?
Choices:
20
21
22
23
24
25
26
27
28
29
Program:
function: Find
inputs: Amritsar
function: Relate
dependencies: 0
inputs: country
forward
function: Find
inputs: India
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: country
backward
function: FilterConcept
dependencies: 4
inputs: state of India
function: Find
inputs: Japan
function: Relate
dependencies: 6
inputs: diplomatic relation
forward
function: Find
inputs: India
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 10
inputs: state of India
function: And
dependencies: 5
11
function: Count
dependencies: 12
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "state of India" . ?e <country> ?e_1 . ?e_1 <pred:name> "India" . ?e_2 <country> ?e_1 . ?e_2 <pred:name> "Amritsar" .  ?e_3 <contains_administrative_territorial_entity> ?e . ?e_3 <pred:name> "India" . ?e_4 <diplomatic_relation> ?e_3 . ?e_4 <pred:name> "Japan" .  }
Answer: 23