parlai/tasks/light_dialog/builder.py [160:201]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            used_current = False
            shown = {}
            if (
                use_feat(opt, 'light_use_current_self_output', 'speech')
                and label_type != 'speech'
                and d['speech'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    if opt['light_use_speech_prefix']:
                        text += '_self_say '
                    text += str(d['speech'][i + 1]) + '\n'
                    shown['speech'] = True
                used_current = True
            if (
                use_feat(opt, 'light_use_current_self_output', 'all')
                and label_type != 'action'
                and use_feat(opt, 'light_use_action', 'self')
                and d['action'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    text += '_self_act ' + str(d['action'][i + 1]) + '\n'
                    shown['action'] = True
                used_current = True
            if (
                use_feat(opt, 'light_use_current_self_output', 'all')
                and label_type != 'emote'
                and use_feat(opt, 'light_use_emote', 'self')
                and d['emote'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    text += '_self_emote ' + str(d['emote'][i + 1]) + '\n'
                    shown['emote'] = True
                used_current = True
            if (
                'all_filtered' in opt['light_use_current_self_output']
                and used_current is False
            ):
                label = None
            if label is not None:
                msg = {}
                msg['text'] = text
                msg['labels'] = label
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



parlai/tasks/light_dialog_wild/builder.py [270:311]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            used_current = False
            shown = {}
            if (
                use_feat(opt, 'light_use_current_self_output', 'speech')
                and label_type != 'speech'
                and d['speech'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    if opt['light_use_speech_prefix']:
                        text += '_self_say '
                    text += str(d['speech'][i + 1]) + '\n'
                    shown['speech'] = True
                used_current = True
            if (
                use_feat(opt, 'light_use_current_self_output', 'all')
                and label_type != 'action'
                and use_feat(opt, 'light_use_action', 'self')
                and d['action'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    text += '_self_act ' + str(d['action'][i + 1]) + '\n'
                    shown['action'] = True
                used_current = True
            if (
                use_feat(opt, 'light_use_current_self_output', 'all')
                and label_type != 'emote'
                and use_feat(opt, 'light_use_emote', 'self')
                and d['emote'][i + 1] is not None
            ):
                if 'remove' not in opt['light_use_current_self_output']:
                    text += '_self_emote ' + str(d['emote'][i + 1]) + '\n'
                    shown['emote'] = True
                used_current = True
            if (
                'all_filtered' in opt['light_use_current_self_output']
                and used_current is False
            ):
                label = None
            if label is not None:
                msg = {}
                msg['text'] = text
                msg['labels'] = label
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



