Horje
gensim show_topics get topic Code Example
gensim show_topics get topic
# based on the answer given by user in the source link

from gensim.models import LdaModel

# lda = LdaModel(...)
# ... after training ...
x = lda.show_topics(num_topics=12, num_words=5, formatted=False)

# tp[0]: topic
# tp[1]: weight of the word for the corresponding topic
topics_words = [(tp[0], tp[1]) for tp in x]




Python

Related
right-left staircase python Code Example right-left staircase python Code Example
how to get checkbutton from a list Code Example how to get checkbutton from a list Code Example
python calendar Code Example python calendar Code Example
removing duplicates using json python Code Example removing duplicates using json python Code Example
python check if list Code Example python check if list Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
6