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

Method count_instance

extraction/predict_parser/predict_parser.py:73–84  ·  view source on GitHub ↗
(self, gold_list, pred_list, verbose=False)

Source from the content-addressed store, hash-verified

71 }
72
73 def count_instance(self, gold_list, pred_list, verbose=False):
74 if verbose:
75 print("Gold:", gold_list)
76 print("Pred:", pred_list)
77 self.gold_num += len(gold_list)
78 self.pred_num += len(pred_list)
79
80 dup_gold_list = deepcopy(gold_list)
81 for pred in pred_list:
82 if pred in dup_gold_list:
83 self.tp += 1
84 dup_gold_list.remove(pred)

Callers 1

eval_predFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected