From fed068255c2eccf864e87a68cc35cfaa9d741f1c Mon Sep 17 00:00:00 2001 From: MaartenGr Date: Thu, 15 Aug 2024 15:10:31 +0200 Subject: [PATCH] Revert correcting labels --- bertopic/_bertopic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bertopic/_bertopic.py b/bertopic/_bertopic.py index 69a1ce2a..0ae6ae70 100644 --- a/bertopic/_bertopic.py +++ b/bertopic/_bertopic.py @@ -313,7 +313,7 @@ def topic_labels_(self): if self._is_zeroshot(): # Need to correct labels from zero-shot topics topic_id_to_zeroshot_label = { - self.topic_mapper_.get_mappings()[topic_id]: self.zeroshot_topic_list[zeroshot_topic_idx] + topic_id: self.zeroshot_topic_list[zeroshot_topic_idx] for topic_id, zeroshot_topic_idx in self._topic_id_to_zeroshot_topic_idx.items() } topic_labels.update(topic_id_to_zeroshot_label)