MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / get_extract_metrics

Function get_extract_metrics

extraction/extraction_metrics.py:45–52  ·  view source on GitHub ↗
(pred_lns: List[str], tgt_lns: List[str], label_constraint: EventSchema, decoding_format='tree')

Source from the content-addressed store, hash-verified

43
44
45def get_extract_metrics(pred_lns: List[str], tgt_lns: List[str], label_constraint: EventSchema, decoding_format='tree'):
46 predict_parser = get_predict_parser(format_name=decoding_format)(
47 schema=label_constraint)
48 return eval_pred(
49 predict_parser=predict_parser,
50 gold_list=tgt_lns,
51 pred_list=pred_lns
52 )

Callers 2

compute_metricsFunction · 0.90
extraction_metricsFunction · 0.90

Calls 2

get_predict_parserFunction · 0.85
eval_predFunction · 0.85

Tested by

no test coverage detected