def buy_coffee(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p1'], context.verbs['buy'], context.nouns['coffee']) event.append(scene) generating_fillers.append(generating) return transition(True, [leave_coffeeshop])
def leave_coffeeshop(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p1'], context.verbs['leave'], context.nouns['coffeeshop']) event.append(scene) generating_fillers.append(generating) return None
def apologize(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p1'], context.verbs['apologize'], variables['p2']) event.append(scene) generating_fillers.append(generating) return transition(True, [buy_coffee])
def confront(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p2'], context.verbs['confront'], variables['p1'], object_property='violent') event.append(scene) generating_fillers.append(generating) return transition(variables['p1']['properties']['violent'], [hit, apologize])
def walk_to_back(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p1'], context.verbs['obey'], context.nouns['line'], subject_property='impatient') event.append(scene) generating_fillers.append(generating) return transition(variables['p1']['properties']['impatient'], [walk_to_front, buy_coffee])
def enter_coffeeshop(event, generating_fillers, chosen_properties, variables, context, encoding): scene, generating = encode_scene(context, encoding, chosen_properties, variables['p1'], context.verbs['enter'], context.nouns['coffeeshop'], subject_property='thirsty') event.append(scene) generating_fillers.append(generating) return transition(variables['p1']['properties']['thirsty'], [walk_to_front, walk_to_back])