BERTopic icon indicating copy to clipboard operation
BERTopic copied to clipboard

Proper exception handling for documents with no topics

Open armandidandeh opened this issue 5 years ago • 1 comments

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.

armandidandeh avatar Dec 20 '20 06:12 armandidandeh

Yes! I will make sure that in the next version there is better handling of this error.

MaartenGr avatar Dec 20 '20 06:12 MaartenGr