def _generate_examples(self, file_path, act_path, emotion_path, split):
    ' Yields examples. '
    with open(file_path, 'r', encoding='utf-8') as f, open(act_path, 'r', encoding='utf-8') as act, open(emotion_path, 'r', encoding='utf-8') as emotion:
        for (i, (line_f, line_act, line_emotion)) in enumerate(zip(f, act, emotion)):
            if (len(line_f.strip()) == 0):
                break
            dialog = line_f.split(self.__EOU__)[:(- 1)]
            act = line_act.split(' ')[:(- 1)]
            emotion = line_emotion.split(' ')[:(- 1)]
            assert (len(dialog) == len(act) == len(emotion)), 'Different turns btw dialogue & emotion & action'
            (yield (f'{split}-{i}', {'dialog': dialog, 'act': [act_label[x] for x in act], 'emotion': [emotion_label[x] for x in emotion]}))
Yields examples.
def _generate_examples(self, file_path, act_path, emotion_path, split):
    '  '
    with open(file_path, 'r', encoding='utf-8') as f, open(act_path, 'r', encoding='utf-8') as act, open(emotion_path, 'r', encoding='utf-8') as emotion:
        for (i, (line_f, line_act, line_emotion)) in enumerate(zip(f, act, emotion)):
            if (len(line_f.strip()) == 0):
                break
            dialog = line_f.split(self.__EOU__)[:(- 1)]
            act = line_act.split(' ')[:(- 1)]
            emotion = line_emotion.split(' ')[:(- 1)]
            assert (len(dialog) == len(act) == len(emotion)), 'Different turns btw dialogue & emotion & action'
            (yield (f'{split}-{i}', {'dialog': dialog, 'act': [act_label[x] for x in act], 'emotion': [emotion_label[x] for x in emotion]}))