Simple Question (Direct)
Simple Question
Q125020
P106
Q12737077
USER
What are the job of Alfred Gysi ?
(Q125020,P106,c(Q12737077))
action filter_type
action find
entity Q125020
relation P106
type Q12737077
['Q125020', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:Q12737077 . resource:Q125020 property:P106 ?i }
Alfred Gysi
action filter_type
action find
entity Alfred Gysi
relation occupation
type occupation
['Alfred Gysi', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:occupation . resource:Alfred_Gysi property:occupation ?i }
[]
occupation
Q27349 Q1622272
SYSTEM
dentist, university teacher
Q27349 Q1622272
(Q125020,P106,c(Q12737077))
action filter_type
action find
entity Q125020
relation P106
type Q12737077
The job of Alfred Gysi are a [ANSWERS]
['Q125020', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:Q12737077 . resource:Q125020 property:P106 ?i }
dentist university teacher
The job of Alfred Gysi are a dentist and university teacher
dentist university teacher
action filter_type
action find
entity Alfred Gysi
relation occupation
type occupation
['Alfred Gysi', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:occupation . resource:Alfred_Gysi property:occupation ?i }
[]
Simple Question (Direct)
Simple Question|Mult. Entity|Indirect
Q27349 Q1622272
P417
Q502895
USER
Who are the patron saints of dentist and university teacher ?
(Q27349,P417,c(Q502895)) (Q1622272,P417,c(Q502895))
action union
action filter_type
action find
entity Q27349
relation P417
type Q502895
action filter_type
action find
entity Q1622272
relation P417
type Q502895
['Q27349', 'P417', {'concept': 'Q502895'}] ['Q1622272', 'P417', {'concept': 'Q502895'}]
SELECT DISTINCT ?x WHERE { { resource:Q27349 property:P417 ?x . ?x rdf:type ontology:Q502895 } UNION { resource:Q1622272 property:P417 ?x . ?x rdf:type ontology:Q502895 } }
dentist university teacher
action union
action filter_type
action find
entity dentist
relation patron saint
type common name
action filter_type
action find
entity university teacher
relation patron saint
type common name
['dentist', 'patron saint', {'concept': 'common name'}] ['university teacher', 'patron saint', {'concept': 'common name'}]
SELECT DISTINCT ?x WHERE { { resource:dentist property:patron_saint ?x . ?x rdf:type ontology:common_name } UNION { resource:university_teacher property:patron_saint ?x . ?x rdf:type ontology:common_name } }
[]
common name
Q232427 Q9438
SYSTEM
Saint Apollonia, Thomas Aquinas
Q232427 Q9438
(Q27349,P417,c(Q502895)) (Q1622272,P417,c(Q502895))
action union
action filter_type
action find
entity Q27349
relation P417
type Q502895
action filter_type
action find
entity Q1622272
relation P417
type Q502895
The patron saints of dentist and university teacher are [ANSWERS]
['Q27349', 'P417', {'concept': 'Q502895'}] ['Q1622272', 'P417', {'concept': 'Q502895'}]
SELECT DISTINCT ?x WHERE { { resource:Q27349 property:P417 ?x . ?x rdf:type ontology:Q502895 } UNION { resource:Q1622272 property:P417 ?x . ?x rdf:type ontology:Q502895 } }
Saint Apollonia Thomas Aquinas
The patron saints of dentist and university teacher are Saint Apollonia and Thomas Aquinas
Saint Apollonia Thomas Aquinas
action union
action filter_type
action find
entity dentist
relation patron saint
type common name
action filter_type
action find
entity university teacher
relation patron saint
type common name
['dentist', 'patron saint', {'concept': 'common name'}] ['university teacher', 'patron saint', {'concept': 'common name'}]
SELECT DISTINCT ?x WHERE { { resource:dentist property:patron_saint ?x . ?x rdf:type ontology:common_name } UNION { resource:university_teacher property:patron_saint ?x . ?x rdf:type ontology:common_name } }
[]
Simple Question (Direct)
Simple Question|Mult. Entity|Indirect
Q232427 Q9438
P417
Q12737077
USER
Who have Saint Apollonia and Thomas Aquinas as their patron saint ?
(c(Q12737077),P417,Q232427) (c(Q12737077),P417,Q9438)
action union
action filter_type
action find_reverse
entity Q232427
relation P417
type Q12737077
action filter_type
action find_reverse
entity Q9438
relation P417
type Q12737077
[{'concept': 'Q12737077'}, 'P417', 'Q232427'] [{'concept': 'Q12737077'}, 'P417', 'Q9438']
SELECT DISTINCT ?q WHERE { ?q property:P417 ?o . VALUES ( ?o ) { ( resource:Q232427 ) ( resource:Q9438 ) } }
Saint Apollonia Thomas Aquinas
action union
action filter_type
action find_reverse
entity Saint Apollonia
relation patron saint
type occupation
action filter_type
action find_reverse
entity Thomas Aquinas
relation patron saint
type occupation
[{'concept': 'occupation'}, 'patron saint', 'Saint Apollonia'] [{'concept': 'occupation'}, 'patron saint', 'Thomas Aquinas']
SELECT DISTINCT ?q WHERE { ?q property:patron_saint ?o . VALUES ( ?o ) { ( resource:Saint_Apollonia ) ( resource:Thomas_Aquinas ) } }
[]
occupation
Q27349 Q1622272
SYSTEM
dentist, university teacher
Q27349 Q1622272
(c(Q12737077),P417,Q232427) (c(Q12737077),P417,Q9438)
action union
action filter_type
action find_reverse
entity Q232427
relation P417
type Q12737077
action filter_type
action find_reverse
entity Q9438
relation P417
type Q12737077
The [ANSWERS] have Saint Apollonia and Thomas Aquinas as their patron saint
[{'concept': 'Q12737077'}, 'P417', 'Q232427'] [{'concept': 'Q12737077'}, 'P417', 'Q9438']
SELECT DISTINCT ?q WHERE { ?q property:P417 ?o . VALUES ( ?o ) { ( resource:Q232427 ) ( resource:Q9438 ) } }
dentist university teacher
The dentist and university teacher have Saint Apollonia and Thomas Aquinas as their patron saint
dentist university teacher
action union
action filter_type
action find_reverse
entity Saint Apollonia
relation patron saint
type occupation
action filter_type
action find_reverse
entity Thomas Aquinas
relation patron saint
type occupation
[{'concept': 'occupation'}, 'patron saint', 'Saint Apollonia'] [{'concept': 'occupation'}, 'patron saint', 'Thomas Aquinas']
SELECT DISTINCT ?q WHERE { ?q property:patron_saint ?o . VALUES ( ?o ) { ( resource:Saint_Apollonia ) ( resource:Thomas_Aquinas ) } }
[]
Clarification
Simple Question|Single Entity|Indirect
Q1622272
P425
Q2385804
USER
Who has that one as the associated field of occupation ?
(Q1622272,P425,c(Q2385804))
action filter_type
action find
entity Q1622272
relation P425
type Q2385804
['Q1622272', 'P425', {'concept': 'Q2385804'}]
SELECT DISTINCT ?h WHERE { resource:Q1622272 property:P425 ?h . ?h rdf:type ontology:Q2385804 }
university teacher
action filter_type
action find
entity university teacher
relation field of this occupation
type educational institution
['university teacher', 'field of this occupation', {'concept': 'educational institution'}]
SELECT DISTINCT ?h WHERE { resource:university_teacher property:field_of_this_occupation ?h . ?h rdf:type ontology:educational_institution }
[]
educational institution
Clarification for simple ques.
Q1622272
SYSTEM
Did you mean university teacher ?
Q27349 Q1622272
(Q27349,P425,c(Q2385804)) (Q1622272,P425,c(Q2385804))
[ANSWER]
['Q27349', 'P425', {'concept': 'Q2385804'}] ['Q1622272', 'P425', {'concept': 'Q2385804'}]
SELECT DISTINCT ?h WHERE { resource:Q1622272 property:P425 ?h . ?h rdf:type ontology:Q2385804 }
dentist university teacher
Did you mean university teacher ?
university teacher
['dentist', 'field of this occupation', {'concept': 'educational institution'}] ['university teacher', 'field of this occupation', {'concept': 'educational institution'}]
SELECT DISTINCT ?h WHERE { resource:university_teacher property:field_of_this_occupation ?h . ?h rdf:type ontology:educational_institution }
[]
Simple Question (Coreferenced)
USER
Yes
(Q1622272,P425,c(Q2385804))
['Q1622272', 'P425', {'concept': 'Q2385804'}]
['university teacher', 'field of this occupation', {'concept': 'educational institution'}]
[]
Q3918
SYSTEM
university
Q3918
(Q1622272,P425,c(Q2385804))
action filter_type
action find
entity Q1622272
relation P425
type Q2385804
[ANSWER] has that one as the associated field of occupation
['Q1622272', 'P425', {'concept': 'Q2385804'}]
SELECT DISTINCT ?h WHERE { resource:Q1622272 property:P425 ?h . ?h rdf:type ontology:Q2385804 }
university
University has that one as the associated field of occupation
university
action filter_type
action find
entity university teacher
relation field of this occupation
type educational institution
['university teacher', 'field of this occupation', {'concept': 'educational institution'}]
SELECT DISTINCT ?h WHERE { resource:university_teacher property:field_of_this_occupation ?h . ?h rdf:type ontology:educational_institution }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, object is indirect
Q3918 Q330662
P69
Q502895
USER
Was Juhayman al-Otaybi a student at that educational institution ?
(Q330662,P69,Q3918)
action is_in
entity Q3918
action find
entity Q330662
relation P69
['Q330662', 'P69', 'Q3918']
ASK WHERE { resource:Q330662 property:P69 resource:Q3918 }
university Juhayman al-Otaybi
action is_in
entity university
action find
entity Juhayman al-Otaybi
relation educated at
['Juhayman al-Otaybi', 'educated at', 'university']
ASK WHERE { resource:Juhayman_al-Otaybi property:educated_at resource:university }
[]
common name
SYSTEM
YES
(Q330662,P69,Q3918)
action is_in
entity Q3918
action find
entity Q330662
relation P69
[ANSWER]
['Q330662', 'P69', 'Q3918']
ASK WHERE { resource:Q330662 property:P69 resource:Q3918 }
Yes
action is_in
entity university
action find
entity Juhayman al-Otaybi
relation educated at
['Juhayman al-Otaybi', 'educated at', 'university']
ASK WHERE { resource:Juhayman_al-Otaybi property:educated_at resource:university }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q16062094 Q232427
P19
Q56061
USER
Which administrative territories are the places of birth of Saint Apollonia or Anna Fonsou ?
OR((Q232427,P19,c(Q56061)), (Q16062094,P19,c(Q56061)))
action filter_type
action union
action find
entity Q232427
relation P19
action find
entity Q16062094
relation P19
type Q56061
{'OR': [['Q232427', 'P19', {'concept': 'Q56061'}], ['Q16062094', 'P19', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Q232427 property:P19 ?q } UNION { resource:Q16062094 property:P19 ?q } } . ?q rdf:type ontology:Q56061 }
Anna Fonsou Saint Apollonia
action filter_type
action union
action find
entity Saint Apollonia
relation place of birth
action find
entity Anna Fonsou
relation place of birth
type administrative territorial entity
{'OR': [['Saint Apollonia', 'place of birth', {'concept': 'administrative territorial entity'}], ['Anna Fonsou', 'place of birth', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Saint_Apollonia property:place_of_birth ?q } UNION { resource:Anna_Fonsou property:place_of_birth ?q } } . ?q rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q1524 Q87
SYSTEM
Athens, Alexandria
Q1524 Q87
OR((Q232427,P19,c(Q56061)), (Q16062094,P19,c(Q56061)))
action filter_type
action union
action find
entity Q232427
relation P19
action find
entity Q16062094
relation P19
type Q56061
[ANSWERS] are the places of birth of Saint Apollonia or Anna Fonsou
{'OR': [['Q232427', 'P19', {'concept': 'Q56061'}], ['Q16062094', 'P19', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Q232427 property:P19 ?q } UNION { resource:Q16062094 property:P19 ?q } } . ?q rdf:type ontology:Q56061 }
Athens Alexandria
Athens and Alexandria are the places of birth of Saint Apollonia or Anna Fonsou
Athens Alexandria
action filter_type
action union
action find
entity Saint Apollonia
relation place of birth
action find
entity Anna Fonsou
relation place of birth
type administrative territorial entity
{'OR': [['Saint Apollonia', 'place of birth', {'concept': 'administrative territorial entity'}], ['Anna Fonsou', 'place of birth', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Saint_Apollonia property:place_of_birth ?q } UNION { resource:Anna_Fonsou property:place_of_birth ?q } } . ?q rdf:type ontology:administrative_territorial_entity }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q3610310 Q1524
P190 P20
Q56061
USER
Which administrative territories are sister towns of Athens and did Alessandro Sinigaglia die ?
AND((Q1524,P190,c(Q56061)), (Q3610310,P20,c(Q56061)))
action filter_type
action intersection
action find
entity Q1524
relation P190
action find
entity Q3610310
relation P20
type Q56061
{'AND': [['Q1524', 'P190', {'concept': 'Q56061'}], ['Q3610310', 'P20', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:Q56061 . resource:Q1524 property:P190 ?b . resource:Q3610310 property:P20 ?b }
Alessandro Sinigaglia Athens
action filter_type
action intersection
action find
entity Athens
relation sister city
action find
entity Alessandro Sinigaglia
relation place of death
type administrative territorial entity
{'AND': [['Athens', 'sister city', {'concept': 'administrative territorial entity'}], ['Alessandro Sinigaglia', 'place of death', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:administrative_territorial_entity . resource:Athens property:sister_city ?b . resource:Alessandro_Sinigaglia property:place_of_death ?b }
[]
administrative territorial entity
Q2044
SYSTEM
Florence
Q2044
AND((Q1524,P190,c(Q56061)), (Q3610310,P20,c(Q56061)))
action filter_type
action intersection
action find
entity Q1524
relation P190
action find
entity Q3610310
relation P20
type Q56061
[ANSWER] is sister towns of Athens and did Alessandro Sinigaglia die
{'AND': [['Q1524', 'P190', {'concept': 'Q56061'}], ['Q3610310', 'P20', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:Q56061 . resource:Q1524 property:P190 ?b . resource:Q3610310 property:P20 ?b }
Florence
Florence is sister towns of Athens and did Alessandro Sinigaglia die
Florence
action filter_type
action intersection
action find
entity Athens
relation sister city
action find
entity Alessandro Sinigaglia
relation place of death
type administrative territorial entity
{'AND': [['Athens', 'sister city', {'concept': 'administrative territorial entity'}], ['Alessandro Sinigaglia', 'place of death', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:administrative_territorial_entity . resource:Athens property:sister_city ?b . resource:Alessandro_Sinigaglia property:place_of_death ?b }
[]