gensim.models.LsiModel.show_topic¶
-
LsiModel.
show_topic
(topicno, topn=10)[source]¶ Return a specified topic (=left singular vector), 0 <= topicno < self.num_topics, as a string.
Return only the topn words which contribute the most to the direction of the topic (both negative and positive).
>>> lsimodel.show_topic(10, topn=5) [("category", -0.340), ("$M$", 0.298), ("algebra", 0.183), ("functor", -0.174), ("operator", -0.168)]