Open syGOAT opened 4 months ago
When you run .hierarchical_topics
, you get a dataframe that specifies the potential merging of topics and their distances, namely the hierarchical_topics
variable in your code.
You can use this to select a threshold that you think works best for your use case. Based on the filtered dataframe, you can then extract the sets of topics that should be merged and merge them with .merge_topics
.
I have read this part of the official document: https://maartengr.github.io/BERTopic/getting_started/hierarchicaltopics/hierarchicaltopics.html#visualizations:~:text=Merge%20topics,-%C2%B6 It is realy a great way to creat the potential hierarchical nature of topics and merge topics! I have a further question, which is how to to merge topics automatically after getting the potential hierarchy of all topics? For example, when I ran:
The figure is bellow:
I think the horizontal axis is 'distance' between each topic.
The merge method in official document is specifying the indexes of the topics. How can I merge topics automatically if the 'distance' between two topics is less than a sertain number, such as 0.3?
My model is defined like this:
Vision: