BERTopic icon indicating copy to clipboard operation
BERTopic copied to clipboard

Custom labels not implemented, error in documentation

Open raphaelreimann opened this issue 3 years ago • 2 comments

The documentation suggests that the new custom labels argument is implemented for most visualizations, such as topic_model.visualize_barchart(custom_labels=True). This new argument is however not implemented for .visualize_barchart() and .visualize_topics(). See

Then, to make use of those custom topic labels across visualizations, such as .visualize_hierarchy(), we can use the custom_labels=True parameter that is found in most visualizations.

Either the documentation should be changed to use another type of visualization to show off this new feature, or the usage of custom labels should be implemented for all supported visualization techniques. The latter would be very welcomed as I am trying to use custom labels with those two visualizations, however changing the documentation would be the easier fix @MaartenGr 😄

raphaelreimann avatar Aug 01 '22 12:08 raphaelreimann

Thanks for mentioning this! It is indeed a documentation issue as the barcharts show the topic representations directly through the bars. However, it might indeed make sense to add the topic representation as a title to each topic. I will make sure to put this on the to-do list as I will have to figure out the best styling for this. Also, I am planning some fixes that integrate tightly with the visualizations that will need some design changes.

MaartenGr avatar Aug 02 '22 05:08 MaartenGr

Hi, @raphaelreimann and @MaartenGr!

I just pushed a PR for the fix here: https://github.com/MaartenGr/BERTopic/pull/694

leloykun avatar Aug 30 '22 23:08 leloykun