Update operate.py

This commit is contained in:
zrguo
2025-03-05 15:12:01 +08:00
parent ea8fe3d7a0
commit 5e7ef39998

View File

@@ -1242,9 +1242,11 @@ async def _find_most_related_text_unit_from_entities(
all_text_units_lookup = {} all_text_units_lookup = {}
tasks = [] tasks = []
for index, (this_text_units, this_edges) in enumerate(zip(text_units, edges)): for index, (this_text_units, this_edges) in enumerate(zip(text_units, edges)):
for c_id in this_text_units: for c_id in this_text_units:
if c_id not in all_text_units_lookup: if c_id not in all_text_units_lookup:
all_text_units_lookup[c_id] = index
tasks.append((c_id, index, this_edges)) tasks.append((c_id, index, this_edges))
results = await asyncio.gather( results = await asyncio.gather(