Closed pariskang closed 1 year ago
Hi @pariskang
You can get the top-n topics assigned to each document, using get_topics()
method of Document
class as follows:
for i, doc in enumerate(mdl.docs):
print("{}th document's top-10 topics: {}".format(i, doc.get_topics(top_n=10)))
Thank you! Your code seems really nice for me. I tried and then worked it out
How to add a new column to show which topic is assigned to each document. I really need your help. Thank u.
mdl.docs[1].get_topic_dist() # topic distribution of the first doc