corpus is just the preloaded list of wordsmodel models ldamodel ldamodelcorpusnum_topics= id word=corpus id wordthis one-step process will build topic model we can explore the topics in many ways we can see the list of topics document refers to by using the model[docsyntaxtopics [model[cfor in corpusprint topics[ [( )( )( )( ) elided some of the outputbut the format is list of pairs (topic_indextopic_ weightwe can see that only few topics are used for each document the topic model is sparse modelas although there are many possible topics for each documentonly few of them are used we can plot histogram of the number of topics as shown in the following graph