python - infer topic distributions on new, unseen documents with LDA and Gensim -


suppose have generated latent dirichlet allocation model of corpus1 using basic command:

ldamodel = gensim.models.ldamodel.ldamodel(corpus1, num_topics=25, id2word = dictionary, passes=50, minimum_probability=0) 

my question be, how can classify new documents `corpus2'?

i trying use following command print(ldamodel[corpus2[1]]) obtain distribution first document following error:

valueerror: not enough values unpack (expected 2, got 1) 

i confused regarding class object corpus2 should be. suggestions of find more information or tutorial more welcome


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -