Ejemplo n.º 1
0
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])
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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])
Ejemplo n.º 4
0
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])
Ejemplo n.º 5
0
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])
Ejemplo n.º 6
0
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])