import os

import trees 
from evaluate import seg_fscore_from_file,evalb
datadir = '/disk/scratch1/s1899827/prosody_nlp/data/input_features/turn_pipeline'
outdir = '/disk/scratch1/s1899827/prosody_nlp/code/self_attn_speech_parser/output/turn_pipeline_no_voicing_redux'

pred_files = ['sp_seg_26229_dev=89.54.pt.silver.parsed.FRAG.silver.turns',  'sp_seg_5154_dev=89.62.pt.silver.parsed.FRAG.silver.turns',   'sp_seg_73784_dev=89.99.pt.silver.parsed.FRAG.silver.turns', 'sp_seg_38976_dev=89.46.pt.silver.parsed.FRAG.silver.turns',  'sp_seg_72240_dev=89.59.pt.silver.parsed.FRAG.silver.turns']
              
for pred_f in pred_files:
    print(pred_f)
    pred_f = os.path.join(outdir,pred_f)

    gold_f = os.path.join(datadir,'dev.lbl.final_one')

    id_f = os.path.join(datadir,'dev.ids')


    print(seg_fscore_from_file(gold_f,pred_f))




