BERTopic
BERTopic copied to clipboard
Proper exception handling for documents with no topics
I have come across a few cases in my corpus where probabilities[i] returns no probabilities that are equal or exceed min_probability and thus visualize_distribution will through and exception on vals = probabilities[labels_idx].tolist().
A better exception handling for these cases by showing an informative alert could be very handy instead of breaking the code.
Yes! I will make sure that in the next version there is better handling of this error.