def __init__(self, data, label_dict,
gold_props_file=None,
use_se_marker=False,
pred_props_file=None,
word_dict=None):
self.data = data
self.best_accuracy = 0.0
self.has_best = False
self.label_dict = label_dict
self.gold_props_file = gold_props_file
self.pred_props_file = pred_props_file
self.use_se_marker = use_se_marker
if gold_props_file is None and pred_props_file is None:
print ('Warning: not using official gold predicates. Not for formal evaluation.')
''' Output to mock gold '''
assert word_dict != None
conll_output_path = join(ROOT_DIR, 'temp/srl_pred_%d.gold.tmp' % os.getpid())
print_gold_to_conll(self.data, word_dict, label_dict, conll_output_path)
self.pred_props_file = conll_output_path
评论列表
文章目录