import os

splits = ['train','dev','test']

for split in splits:
    #datadir = '/afs/inf.ed.ac.uk/group/project/prosody/prosody_nlp/data/input_features/turn_opensmile'
    datadir = '/afs/inf.ed.ac.uk/group/project/prosody/prosody_nlp/code/self_attn_speech_parser/output/turn_opensmile/'
    #lbl_f = os.path.join(datadir,f'turn_{split}.lbl')
    lbl_f = os.path.join(datadir,f'turn_sp_parse_72240_dummy_penalty.5_dev=85.33.pt_dev_predicted.txt.lbl')

    with open(lbl_f,'r') as f:
        lbls = [line.strip().split() for line in f.readlines()]

    for lbl in lbls:
        lbl[-1] = '1'

    out_f = lbl_f+".final_one"

    with open(out_f,'w') as f:
        for line in lbls:
            f.write(' '.join(line))
            f.write('\n')

import pdb;pdb.set_trace()



