- #1
EngWiPy
- 1,368
- 61
Hello,
I am running a program that takes relatively long time to read the corpus of some documents, and create the topic model. The code to do this is:
I am testing different things with the code, and it's a little slow to run the code several times because of the above code's segment. How can I overcome this issue?
Thanks
I am running a program that takes relatively long time to read the corpus of some documents, and create the topic model. The code to do this is:
Code:
from gensim import models, corpora
corpus = corpora.BleiCorpus('./data/ap/ap.dat', './data/ap/vocab.txt')
#Creating the topic model
model = models.ldamodel.LdaModel(corpus, num_topics = 100, id2word = corpus.id2word)
I am testing different things with the code, and it's a little slow to run the code several times because of the above code's segment. How can I overcome this issue?
Thanks