Skip to content

Instantly share code, notes, and snippets.

@avriiil
Created June 17, 2021 10:37
Show Gist options
  • Save avriiil/be8fde19fe9624dd4eac02f4805ca26e to your computer and use it in GitHub Desktop.
Save avriiil/be8fde19fe9624dd4eac02f4805ca26e to your computer and use it in GitHub Desktop.
# import library from gensim
from gensim.models import CoherenceModel
# instantiate topic coherence model
cm = CoherenceModel(model=lda_model_15, corpus=bow_corpus, texts=docs, coherence='c_v')
# get topic coherence score
coherence_lda = cm.get_coherence()
print(coherence_lda)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment