Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. from gensim import corpora
  2.  
  3. dictionary = corpora.Dictionary(doc_clean)
  4.  
  5. corpus = [dictionary.doc2bow(doc) for doc in doc_clean]
  6.  
  7. lda_model = gensim.models.ldamodel.LdaModel(corpus = corpus , id2word=dictionary , num_topics=10 , random_state=100, update_every=1 , chunksize=100 , passes=10 , alpha='auto' , per_word_topics=True)
  8.  
  9. topics = print(lda_model.print_topic(6))
  10.  
  11. doc_lda = lda_model[corpus]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement