docs = [doc1, doc2, doc3, doc4, doc5]
for i in docs:
    tokens = word_tokenize(i.lower())
stopped_tokens = [w for w in tokens if not w in stopwords.words('english')]
stemmed_tokens = [st.stem(i) for i in stopped_tokens]
texts.append(stemmed_tokens)
dictionary = corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
ldamodel = gensim.models.ldamodel.LdaModel(corpus, num_topics=2, id2word=
    dictionary, passes=20)
print(ldamodel.print_topics(num_topics=2, num_words=4))
Simple Python implementation of collaborative topic modeling?