Simple Question (Direct)
Simple Question
Q99866
P21
Q290
USER
Which sex does Hans-Georg von Seidel possess ?
(Q99866,P21,c(Q290))
action filter_type
action find
entity Q99866
relation P21
type Q290
['Q99866', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?k WHERE { resource:Q99866 property:P21 ?k . ?k rdf:type ontology:Q290 }
Hans-Georg von Seidel
action filter_type
action find
entity Hans-Georg von Seidel
relation gender
type sex
['Hans-Georg von Seidel', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?k WHERE { resource:Hans-Georg_von_Seidel property:gender ?k . ?k rdf:type ontology:sex }
[]
sex
Q6581097
SYSTEM
male
Q6581097
(Q99866,P21,c(Q290))
action filter_type
action find
entity Q99866
relation P21
type Q290
Hans-Georg von Seidel possesses 1 [ANSWER]
['Q99866', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?k WHERE { resource:Q99866 property:P21 ?k . ?k rdf:type ontology:Q290 }
male
Hans-Georg von Seidel possesses 1 male
male
action filter_type
action find
entity Hans-Georg von Seidel
relation gender
type sex
['Hans-Georg von Seidel', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?k WHERE { resource:Hans-Georg_von_Seidel property:gender ?k . ?k rdf:type ontology:sex }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q99866
P607
Q198
USER
Which battles did Hans-Georg von Seidel take part in ?
(Q99866,P607,c(Q198))
action filter_type
action find
entity Q99866
relation P607
type Q198
['Q99866', 'P607', {'concept': 'Q198'}]
SELECT DISTINCT ?p WHERE { resource:Q99866 property:P607 ?p . ?p rdf:type ontology:Q198 }
Hans-Georg von Seidel
action filter_type
action find
entity Hans-Georg von Seidel
relation conflict
type war
['Hans-Georg von Seidel', 'conflict', {'concept': 'war'}]
SELECT DISTINCT ?p WHERE { resource:Hans-Georg_von_Seidel property:conflict ?p . ?p rdf:type ontology:war }
[]
war
Q362 Q361
SYSTEM
World War II, World War I
Q362 Q361
(Q99866,P607,c(Q198))
action filter_type
action find
entity Q99866
relation P607
type Q198
Hans-Georg von Seidel took in part in [ANSWERS]
['Q99866', 'P607', {'concept': 'Q198'}]
SELECT DISTINCT ?p WHERE { resource:Q99866 property:P607 ?p . ?p rdf:type ontology:Q198 }
World War II World War I
Hans-Georg von Seidel took in part in World War II and World War I
World War II World War I
action filter_type
action find
entity Hans-Georg von Seidel
relation conflict
type war
['Hans-Georg von Seidel', 'conflict', {'concept': 'war'}]
SELECT DISTINCT ?p WHERE { resource:Hans-Georg_von_Seidel property:conflict ?p . ?p rdf:type ontology:war }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q8010766
Q198
USER
And how about William Hamilton Fyfe?
(Q8010766,P607,c(Q198))
action filter_type
action find
entity Q8010766
relation P607
type Q198
['Q8010766', 'P607', {'concept': 'Q198'}]
SELECT DISTINCT ?o WHERE { resource:Q8010766 property:P607 ?o . ?o rdf:type ontology:Q198 }
William Hamilton Fyfe
action filter_type
action find
entity William Hamilton Fyfe
relation conflict
type war
['William Hamilton Fyfe', 'conflict', {'concept': 'war'}]
SELECT DISTINCT ?o WHERE { resource:William_Hamilton_Fyfe property:conflict ?o . ?o rdf:type ontology:war }
[]
war
Q361
SYSTEM
World War I
Q361
(Q8010766,P607,c(Q198))
action filter_type
action find
entity Q8010766
relation P607
type Q198
[ANSWER]
['Q8010766', 'P607', {'concept': 'Q198'}]
SELECT DISTINCT ?o WHERE { resource:Q8010766 property:P607 ?o . ?o rdf:type ontology:Q198 }
World War I
World War I
action filter_type
action find
entity William Hamilton Fyfe
relation conflict
type war
['William Hamilton Fyfe', 'conflict', {'concept': 'war'}]
SELECT DISTINCT ?o WHERE { resource:William_Hamilton_Fyfe property:conflict ?o . ?o rdf:type ontology:war }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P361
Q198 Q645883 Q12737077
USER
Which wars are max number of military operations and occupations a part of ?
(c(Q645883)|c(Q12737077),P361,c(Q198))
action argmax
action union
action find_reverse_tuple_counts
relation P361
type Q198
type Q645883
action find_reverse_tuple_counts
relation P361
type Q198
type Q12737077
[[{'concept': 'Q645883'}, {'concept': 'Q12737077'}], 'P361', {'concept': 'Q198'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ( MAX ( ?c ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?u ) AS ?c ) ?r WHERE { ?u rdf:type ?n . VALUES ( ?n ) { ( ontology:Q12737077 ) ( ontology:Q645883 ) } } GROUP BY ?r } } . { SELECT DISTINCT ( COUNT ( ?y ) AS ?s ) ?v WHERE { VALUES ( ?t ) { ( ontology:Q645883 ) ( ontology:Q12737077 ) } . ?y rdf:type ?t } GROUP BY ?v } . FILTER ( ?s = ?d ) }
action argmax
action union
action find_reverse_tuple_counts
relation part of
type war
type military operation
action find_reverse_tuple_counts
relation part of
type war
type occupation
[[{'concept': 'military operation'}, {'concept': 'occupation'}], 'part of', {'concept': 'war'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ( MAX ( ?c ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?u ) AS ?c ) ?r WHERE { ?u rdf:type ?n . VALUES ( ?n ) { ( ontology:occupation ) ( ontology:military_operation ) } } GROUP BY ?r } } . { SELECT DISTINCT ( COUNT ( ?y ) AS ?s ) ?v WHERE { VALUES ( ?t ) { ( ontology:military_operation ) ( ontology:occupation ) } . ?y rdf:type ?t } GROUP BY ?v } . FILTER ( ?s = ?d ) }
[]
war military operation occupation
Q179975
SYSTEM
Chinese Civil War
Q179975
(c(Q645883)|c(Q12737077),P361,c(Q198))
action argmax
action union
action find_reverse_tuple_counts
relation P361
type Q198
type Q645883
action find_reverse_tuple_counts
relation P361
type Q198
type Q12737077
[ANSWER] is max number of military operations and occupations a part of
[[{'concept': 'Q645883'}, {'concept': 'Q12737077'}], 'P361', {'concept': 'Q198'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ( MAX ( ?c ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?u ) AS ?c ) ?r WHERE { ?u rdf:type ?n . VALUES ( ?n ) { ( ontology:Q12737077 ) ( ontology:Q645883 ) } } GROUP BY ?r } } . { SELECT DISTINCT ( COUNT ( ?y ) AS ?s ) ?v WHERE { VALUES ( ?t ) { ( ontology:Q645883 ) ( ontology:Q12737077 ) } . ?y rdf:type ?t } GROUP BY ?v } . FILTER ( ?s = ?d ) }
Chinese Civil War
Chinese Civil War is max number of military operations and occupations a part of
Chinese Civil War
action argmax
action union
action find_reverse_tuple_counts
relation part of
type war
type military operation
action find_reverse_tuple_counts
relation part of
type war
type occupation
[[{'concept': 'military operation'}, {'concept': 'occupation'}], 'part of', {'concept': 'war'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ( MAX ( ?c ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?u ) AS ?c ) ?r WHERE { ?u rdf:type ?n . VALUES ( ?n ) { ( ontology:occupation ) ( ontology:military_operation ) } } GROUP BY ?r } } . { SELECT DISTINCT ( COUNT ( ?y ) AS ?s ) ?v WHERE { VALUES ( ?t ) { ( ontology:military_operation ) ( ontology:occupation ) } . ?y rdf:type ?t } GROUP BY ?v } . FILTER ( ?s = ?d ) }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q6581097 Q8010766
P21 P7
Q502895
USER
Which people have William Hamilton Fyfe as their brother and are a male ?
AND((c(Q502895),P7,Q8010766), (c(Q502895),P21,Q6581097))
action filter_type
action intersection
action find_reverse
entity Q8010766
relation P7
action find_reverse
entity Q6581097
relation P21
type Q502895
{'AND': [[{'concept': 'Q502895'}, 'P7', 'Q8010766'], [{'concept': 'Q502895'}, 'P21', 'Q6581097']]}
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:Q502895 . ?t property:P7 resource:Q8010766 . ?t property:P21 resource:Q6581097 }
male William Hamilton Fyfe
action filter_type
action intersection
action find_reverse
entity William Hamilton Fyfe
relation brother
action find_reverse
entity male
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'brother', 'William Hamilton Fyfe'], [{'concept': 'common name'}, 'gender', 'male']]}
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:common_name . ?t property:brother resource:William_Hamilton_Fyfe . ?t property:gender resource:male }
[]
common name
Q5644949
SYSTEM
Hamilton Fyfe
Q5644949
AND((c(Q502895),P7,Q8010766), (c(Q502895),P21,Q6581097))
action filter_type
action intersection
action find_reverse
entity Q8010766
relation P7
action find_reverse
entity Q6581097
relation P21
type Q502895
And [ANSWER] have William [ANSWER] as their brother and are a male
{'AND': [[{'concept': 'Q502895'}, 'P7', 'Q8010766'], [{'concept': 'Q502895'}, 'P21', 'Q6581097']]}
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:Q502895 . ?t property:P7 resource:Q8010766 . ?t property:P21 resource:Q6581097 }
Hamilton Fyfe
And Hamilton Fyfe have William Hamilton Fyfe as their brother and are a male
Hamilton Fyfe
action filter_type
action intersection
action find_reverse
entity William Hamilton Fyfe
relation brother
action find_reverse
entity male
relation gender
type common name
{'AND': [[{'concept': 'common name'}, 'brother', 'William Hamilton Fyfe'], [{'concept': 'common name'}, 'gender', 'male']]}
SELECT DISTINCT ?t WHERE { ?t rdf:type ontology:common_name . ?t property:brother resource:William_Hamilton_Fyfe . ?t property:gender resource:male }
[]