Update operate.py
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user