mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 22:08:59 +08:00
remove repeat func (#2619)
### What problem does this PR solve? - remove repeat func ### Type of change - [x] Other (please describe): remove repeat func
This commit is contained in:
parent
e11a74eed5
commit
4c0b79c4f6
@ -134,14 +134,6 @@ def run(graph: nx.Graph, args: dict[str, Any]) -> dict[int, dict[str, dict]]:
|
|||||||
return results_by_level
|
return results_by_level
|
||||||
|
|
||||||
|
|
||||||
def add_community_info2graph(graph: nx.Graph, commu_info: dict[str, dict[str, dict]]):
|
|
||||||
for lev, cluster_info in commu_info.items():
|
|
||||||
for cid, nodes in cluster_info.items():
|
|
||||||
for n in nodes["nodes"]:
|
|
||||||
if "community" not in graph.nodes[n]: graph.nodes[n]["community"] = {}
|
|
||||||
graph.nodes[n]["community"].update({lev: cid})
|
|
||||||
|
|
||||||
|
|
||||||
def add_community_info2graph(graph: nx.Graph, nodes: List[str], community_title):
|
def add_community_info2graph(graph: nx.Graph, nodes: List[str], community_title):
|
||||||
for n in nodes:
|
for n in nodes:
|
||||||
if "communities" not in graph.nodes[n]:
|
if "communities" not in graph.nodes[n]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user