Skip to content

Commit

Permalink
make sure the first item in each community is the centroid of the clu…
Browse files Browse the repository at this point in the history
…ser (#2277)
  • Loading branch information
dyaaalbakour authored Dec 14, 2023
1 parent 98ec348 commit 3db309a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sentence_transformers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ def community_detection(embeddings, threshold=0.75, min_community_size=10, batch
extracted_ids = set()

for cluster_id, community in enumerate(extracted_communities):
community = sorted(community)
non_overlapped_community = []
for idx in community:
if idx not in extracted_ids:
Expand Down

0 comments on commit 3db309a

Please sign in to comment.