Parcourir la source

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 il y a 10 mois
Parent
révision
b635002666
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1
    0
      graphrag/leiden.py

+ 1
- 0
graphrag/leiden.py Voir le fichier

@@ -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"]))

Chargement…
Annuler
Enregistrer