Using gensim I was able to extract topics from a set of documents in LSA but how do I access the topics generated from the LDA models?
When printing the
I think syntax of show_topics has changed over time:
show_topics(num_topics=10, num_words=10, log=False, formatted=True)
For num_topics number of topics, return num_words most significant words (10 words per topic, by default).
The topics are returned as a list – a list of strings if formatted is True, or a list of (probability, word) 2-tuples if False.
If log is True, also output this result to log.
Unlike LSA, there is no natural ordering between the topics in LDA. The returned num_topics <= self.num_topics subset of all topics is therefore arbitrary and may change between two LDA training runs.