MaartenGr / BERTopic

Leveraging BERT and c-TF-IDF to create easily interpretable topics.
https://maartengr.github.io/BERTopic/
MIT License
6.19k stars 765 forks source link

Custom labels for get_topic_tree #2123

Open MaartenGr opened 3 months ago

MaartenGr commented 3 months ago

Discussed in https://github.com/MaartenGr/BERTopic/discussions/2122

Originally posted by **clfkenny** August 17, 2024 Hi there, I noticed the `visualize_hierarchy` method has a `custom_labels` parameter. Is there anything similar to this for the `get_topic_tree` method? I use the LLM generated labels as the custom labels so the hierarchy tree is much easier to interpret. Thanks!

This seems like a good first issue for someone wanting to contribute to this repository. It has a very similar structure to the visualize_hierarchy functionality, so I believe it should be straightforward to implement. Unfortunately, I have a large backlog and cannot prioritize this, so if anyone wants to help out then that would be great!

PriyaDCosta commented 2 months ago

May I take this up? I have used BERTopic a lot for my projects and I am happy to contribute.

MaartenGr commented 2 months ago

@PriyaDCosta Thank you for helping out! I believe there is already an open PR at #2125 that is currently tackling this. If I'm not mistaken, a few small changes are needed over there before we can proceed.