Commit 6d09386c authored by Kathryn Elliott's avatar Kathryn Elliott

Maximum topic model coherence

* Added finding maximally coherent topic
model
parent ad4493dd
...@@ -23,3 +23,14 @@ tm = TopicModel(load_data(file), min_topic_count=8, max_topic_count=20, extra_st ...@@ -23,3 +23,14 @@ tm = TopicModel(load_data(file), min_topic_count=8, max_topic_count=20, extra_st
tm.pre_process_corpus() tm.pre_process_corpus()
tm.run_lda() tm.run_lda()
print("")
print("")
print("")
(n, model) = tm.find_maximally_coherent_model()
print("########################################")
print("################ " + str(n) + " ################")
print("########################################")
tm.print_topics(n)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment