Procházet zdrojové kódy

Fix duplicated communitiy (#4187)

### What problem does this PR solve?

#4180

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.15.1
Kevin Hu před 10 měsíci
rodič
revize
b635002666
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1
    0
      graphrag/leiden.py

+ 1
- 0
graphrag/leiden.py Zobrazit soubor

@@ -141,3 +141,4 @@ def add_community_info2graph(graph: nx.Graph, nodes: list[str], community_title)
if "communities" not in graph.nodes[n]:
graph.nodes[n]["communities"] = []
graph.nodes[n]["communities"].append(community_title)
graph.nodes[n]["communities"] = list(set(graph.nodes[n]["communities"]))

Načítá se…
Zrušit
Uložit