in entity_linking.py [0:0]
def calculate_prf_entity(all_gts, all_pds, raw_pds, distinct_slot_values):
ans = calculate_prf_one_group_entity(all_gts, all_pds, raw_pds, distinct_slot_values)
type_stats = {}
for stype in distinct_slot_values:
this_gts = set([t for t in all_gts if t[1] == stype])
this_pds = set([t for t in all_pds if t[1] == stype])
this_raw_pds = set([t for t in raw_pds if t[1] == stype])
type_stats[stype] = calculate_prf_one_group_entity(this_gts, this_pds, this_raw_pds, distinct_slot_values)
ans['type_stats'] = type_stats
return ans