import os
import trees
from evaluate import evalb

datadir = '/afs/inf.ed.ac.uk/group/project/prosody/prosody_nlp/data/input_features/turn_opensmile'
outdir = '/afs/inf.ed.ac.uk/group/project/prosody/prosody_nlp/code/self_attn_speech_parser/output/turn_opensmile'

pred_f = os.path.join(outdir,'turn_nonsp_72240_dummy_penalty.5_dev=85.33.pt_dev.pred')
gold_f = os.path.join(datadir,'turn_dev.trees')
id_f = os.path.join(datadir,'turn_dev.ids')

golds,_ = trees.load_trees_with_idx(gold_f,id_f)
preds,_ = trees.load_trees_with_idx(pred_f,id_f)

print(evalb(outdir, golds,preds,unlbl=True))


