1 from __future__
import print_function
3 from robocup_knowledge
import knowledge_loader
4 common = knowledge_loader.load_knowledge(
"common")
6 not_understood_sentences = [
7 "I'm so sorry! Can you please speak louder and slower? And wait for the ping!",
8 "I am deeply sorry. Please try again, but wait for the ping!",
9 "You and I have communication issues. Speak up!",
10 "All this noise is messing with my audio. Try again"
21 T[{actions : <A1>}] -> C[A1]
36 V_GUIDE -> guide | escort | take | lead | accompany
38 DET -> the | a | an | some
39 MANIPULATION_AREA_DESCRIPTIONS -> on top of | at | in | on
42 for room
in common.location_rooms:
43 grammar +=
'\nROOMS[%s] -> %s' % (room, room)
45 grammar +=
'\nLOCATIONS[%s] -> %s' % (loc, loc)
46 grammar +=
'\n ROOMS_AND_LOCATIONS[X] -> ROOMS[X] | LOCATIONS[X]'
47 for obj
in common.object_names:
48 grammar +=
'\nOBJECT_NAMES[%s] -> %s' % (obj, obj)
50 grammar +=
'\nMANIPULATION_AREA_LOCATIONS[%s] -> MANIPULATION_AREA_DESCRIPTIONS the %s' % (loc, loc)
51 for cat
in common.object_categories:
52 grammar +=
'\nOBJECT_CATEGORIES[%s] -> %s' % (cat, cat)
53 grammar +=
'\nOBJECT_CATEGORIES[objects] -> objects'
54 for place
in common.location_names:
55 grammar +=
'\n PLACEMENTS_AND_BEACONS[%s] -> %s' % (place, place)
64 Q["action" : "answer", "solution": "Nagoya"] -> what city are we in
65 Q["action" : "answer", "solution": "Tech united"] -> what is the name of your team
66 Q["action" : "answer", "solution": "31"] -> how many teams participate in robocup at home this year
67 Q["action" : "answer", "solution": "Hillary Clinton"] -> who won the popular vote in the us election
68 Q["action" : "answer", "solution": "Mount Fuji"] -> what is the highest mountain in japan
69 Q["action" : "answer", "solution": "Pepper and HSR"] -> name the two robocup at home standard platforms
70 Q["action" : "answer", "solution": "Domestic Standard Platform League"] -> what does dspl stand for
71 Q["action" : "answer", "solution": "Social Standard Platform League"] -> what does sspl stand for
72 Q["action" : "answer", "solution": "SoftBank"] -> who did alphabet sell boston dynamics to
73 Q["action" : "answer", "solution": "over 410000 square metres"] -> nagoya has one of the largest train stations in the world. how large is it
74 Q["action" : "answer", "solution": "My team is located in Eindhoven"] -> where is your team located
75 Q["action" : "answer", "solution": "George Lucas"] -> who created star wars
76 Q["action" : "answer", "solution": "Sponge Bob Squarepants"] -> who lives in a pineapple under the sea
77 Q["action" : "answer", "solution": "the inventor of the first compiler"] -> who is grace hopper
78 Q["action" : "answer", "solution": "the inventor of the first compiler"] -> what invented grace hopper
80 WHATWHICH -> what | which
82 BIGGEST_ADJ -> biggest | heaviest
83 SMALLEST_ADJ -> smallest | lightest
85 Q["action" : "answer", "solution": "bread"] -> WHATWHICH is the BIGGEST_ADJ object
86 Q["action" : "answer", "solution": "chopsticks"] -> WHATWHICH is the SMALLEST_ADJ object
87 Q["action" : "answer", "solution": "bread"] -> WHATWHICH is the BIGGEST_ADJ food
88 Q["action" : "answer", "solution": "onion"] -> WHATWHICH is the SMALLEST_ADJ food
89 Q["action" : "answer", "solution": "plate"] -> WHATWHICH is the BIGGEST_ADJ container
90 Q["action" : "answer", "solution": "soup_container"] -> WHATWHICH is the SMALLEST_ADJ container
91 Q["action" : "answer", "solution": "green_tea"] -> WHATWHICH is the BIGGEST_ADJ drink
92 Q["action" : "answer", "solution": "coke"] -> WHATWHICH is the SMALLEST_ADJ drink
93 Q["action" : "answer", "solution": "hair_spray"] -> WHATWHICH is the BIGGEST_ADJ cleaning stuff
94 Q["action" : "answer", "solution": "moisturizer"] -> WHATWHICH is the SMALLEST_ADJ cleaning stuff
95 Q["action" : "answer", "solution": "spoon"] -> WHATWHICH is the BIGGEST_ADJ cutlery
96 Q["action" : "answer", "solution": "chopsticks"] -> WHATWHICH is the SMALLEST_ADJ cutlery
98 Q["action" : "answer", "solution": "the bedroom has one door"] -> how many doors has the bedroom
99 Q["action" : "answer", "solution": "the entrance has one door"] -> how many doors has the entrance
100 Q["action" : "answer", "solution": "the living room has one door"] -> how many doors has the living_room
101 Q["action" : "answer", "solution": "the kitchen has one door"] -> how many doors has the kitchen
102 Q["action" : "answer", "solution": "the corridor has zero doors"] -> how many doors has the corridor
103 Q["action" : "answer", "solution": "the balcony has zero doors"] -> how many doors has the balcony
113 Q["action" : "count", "entity" : P] -> how many PEOPLE[P] are in the crowd | tell me the number of PEOPLE[P] in the crowd
124 Q["action" : "c_count", "entity" : X] -> how many people in the crowd are POSITION[X]
125 Q["action" : "c_count", "entity" : W] -> how many people in the crowd are GESTURE[W]
126 Q["action" : "random_gender", "entity" : X] -> the POSITION[X] person was GENDER | tell me if the POSITION[X] person was a GENDER
127 Q["action" : "random_gender", "entity" : X] -> the POSITION[X] person was GENDER or GENDER | tell me if the POSITION[X] person was a GENDER or GENDER | was the POSITION[X] person GENDER or GENDER
128 Q["action" : "random_gender", "entity" : W] -> tell me if the GESTURE[W] person was a GENDER
129 Q["action" : "random_gender", "entity" : W] -> tell me if the GESTURE[W] person was a GENDER or GENDER
130 Q["action" : "c_count", "entity" : L] -> tell me how many people were wearing COLOR[L]
140 SEARCH -> where is | in WHATWHICH room is | where is located
142 Q["action" : "find_placement", "entity" : Y] -> SEARCH the PLACEMENTS_AND_BEACONS[Y]
143 Q["action" : "find_placement", "entity" : Y] -> SEARCH the PLACEMENTS_AND_BEACONS[Y]
144 Q["action" : "count_placement", "entity" : Y, "location" : R] -> how many PLACEMENTS_AND_BEACONS[Y] are in the ROOMS[R]
145 Q["action" : "count_placement", "entity" : Y, "location" : R] -> how many OBJECT_CATEGORIES[Y] are in the ROOMS[R]
146 Q["action" : "count_placement", "entity" : Y, "location" : R] -> how many OBJECT_CATEGORIES[Y] are in the PLACEMENTS_AND_BEACONS[R]
156 ADJR -> smaller | bigger | heavier | lighter
158 Q["action" : "find_object", "entity" : O] -> where can i find DET OBJECT_NAMES[O]
159 Q["action" : "find_category", "entity" : C] -> where can i find DET OBJECT_CATEGORIES[C]
160 Q["action" : "return_category", "entity" : O] -> to WHATWHICH category belong the OBJECT_NAMES[O]
161 Q["action" : "return_color", "entity" : O] -> whats the color of the OBJECT_NAMES[O]
162 Q["action" : "compare_category", "entity_a" : O, "entity_b" : A] -> do the OBJECT_NAMES[O] and OBJECT_NAMES[A] belong to the same category
163 Q["action" : "count_object", "entity" : C] -> how many OBJECT_CATEGORIES[C] there are
165 Q["action" : "count_object", "entity" : C, "location" : Y] -> how many OBJECT_CATEGORIES[C] are in the PLACEMENTS_AND_BEACONS[Y]
166 Q["action" : "count_object", "entity" : O, "location" : Y] -> how many OBJECT_NAMES[O] are in the PLACEMENTS_AND_BEACONS[Y]
167 Q["action" : "category_at_loc", "location" : Y] -> what objects are stored in the PLACEMENTS_AND_BEACONS[Y]
169 Q["action" : "compare", "entity_a" : O, "entity_b" : A] -> between the OBJECT_NAMES[O] and OBJECT_NAMES[A] which one is ADJR
180 PEOPLE['people'] -> people
181 PEOPLE['children'] -> children
182 PEOPLE['adults'] -> adults
183 PEOPLE['elders'] -> elders
184 PEOPLE['males'] -> males
185 PEOPLE['females'] -> females
187 PEOPLE['women'] -> women
188 PEOPLE['boys'] -> boys
189 PEOPLE['girls'] -> girls
191 GENDER -> male | female | man | woman | boy | girl
193 POSITION['standing'] -> standing
194 POSITION['sitting'] -> sitting
195 POSITION['lying'] -> lying
197 GESTURE['waving'] -> waving
198 GESTURE['rise_l_arm'] -> rising left arm
199 GESTURE['rise_r_arm'] -> rising right arm
200 GESTURE['left'] -> pointing left
201 GESTURE['right'] -> pointing right
204 COLOR['blue'] -> blue
205 COLOR['white'] -> white
206 COLOR['black'] -> black
207 COLOR['green'] -> green
208 COLOR['yellow'] -> yellow
211 if __name__ ==
"__main__":
212 print(
"\n\n{}\n\n".format(grammar))