Skip to content

Commit

Permalink
Fix #2100
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenGr committed Jul 28, 2024
1 parent 2353f4c commit db54d8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bertopic/_bertopic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4489,11 +4489,11 @@ def _auto_reduce_topics(self, documents: pd.DataFrame, use_ctfidf: bool = False)
for key, val in sorted(mapped_topics.items()):
mappings[val].append(key)
mappings = {
topic_from: {
"topics_to": topics_to,
"topic_sizes": [self.topic_sizes_[topic] for topic in topics_to],
topic_to: {
"topics_from": topics_from,
"topic_sizes": [self.topic_sizes_[topic] for topic in topics_from],
}
for topic_from, topics_to in mappings.items()
for topic_to, topics_from in mappings.items()
}

# Update documents and topics
Expand Down

0 comments on commit db54d8c

Please sign in to comment.