Replacing cTF-IDF with other topic word extraction algorithms
Hi! I wonder if it's possible to replace cTF-IDF with other topic word extraction algorithms like finding closest words to the cluster centroid as used in top2vec, and if so, whether there're some pointers on which functions to look at. I've located BERTopic._extract_topics() for the scoring part, but I'm not sure vectors can be accessed to calculate similarities. Much appreciated!
That is currently not possible as these two topic extraction methods are quite different from one another. Most functions and variations of BERTopic are dependent on a bag of words representation. Moreover, due to the density-based nature of HDBSCAN, there was purposefully chosen for a technique that makes no assumptions with respect to the structure not a cluster/topic. Having said that, I am working on a new version of BERTopic that allows you to use any variation of c-TF-IDF instead, which should be a step in the right direction.
That's super helpful, thank you!