Ejemplo n.º 1
0
    def segregate_and_react(self):
        if not self.check_if_greeting():
            grammifier = Grammifier(self.words)

            print("Referrer is %s" % grammifier.get_referrer())
            mental_state = grammifier.get_stemmed_mental_state()
            action_type = grammifier.get_action_type()

            strategist = Strategist(strategies)
            strategist.get_strategy_for(mental_state, action_type)
Ejemplo n.º 2
0
    def segregate_and_react(self):
        action_controller = ActionController(self.words)

        if not self.check_if_greeting(
        ) and not action_controller.check_if_action():
            grammifier = Grammifier(self.words)

            print("Referrer is %s" % grammifier.get_referrer())
            mental_state = grammifier.get_stemmed_mental_state()
            action_type = grammifier.get_action_type()

            strategist = Strategist(strategies)
            strategist.get_strategy_for(mental_state, action_type)

        elif action_controller.check_if_action():
            mode = action_controller.get_mode()
            device = action_controller.get_device()
            strategist = Strategist(strategies)
            strategist.get_strategy_for(mode, device)