About Coherence of topic models
Author: nadiafelixCreated Apr 8, 2021Updated Sep 11, 2026
Currently, I am calculating the Coherence of a bertopic model using the gensim. For this I need the n_grams from each text of the corpus. Is it possible? The function used by gensim waits for the corpus and topics, and the topics are tokens that must exist in corpus.
cm = CoherenceModel(topics, corpus, dictionary, coherence='u_mass')
Thanks in advance.
Source: MaartenGr/BERTopic