MCPcopy Create free account
hub / github.com/DataArcTech/ToG / del_all_unknown_entity

Function del_all_unknown_entity

ToG/wiki_func.py:85–96  ·  view source on GitHub ↗
(entity_candidates_id, entity_candidates_name)

Source from the content-addressed store, hash-verified

83
84
85def del_all_unknown_entity(entity_candidates_id, entity_candidates_name):
86 if len(entity_candidates_name) == 1 and entity_candidates_name[0] == "N/A":
87 return entity_candidates_id, entity_candidates_name
88
89 new_candidates_id = []
90 new_candidates_name = []
91 for i, candidate in enumerate(entity_candidates_name):
92 if candidate != "N/A":
93 new_candidates_id.append(entity_candidates_id[i])
94 new_candidates_name.append(candidate)
95
96 return new_candidates_id, new_candidates_name
97
98
99def all_zero(topn_scores):

Callers 1

main_wiki.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected