How to change the format of pre-made corpora to train an lsi model

15 views
Skip to first unread message

Hila Mamekransky

unread,
Jan 14, 2022, 7:28:53 AM1/14/22
to Gensim
Hey, I am new to gensim. I downloaded the text8 corpus and wish to use it to train an LSI model but I think the format of the corpus is different. I have the following code:

from gensim.models import LsiModel
import gensim.downloader as api
corpus = api.load('text8')

When I try 

model = LsiModel(corpus) I get the following error:

ValueError: too many values to unpack (expected 2)

Could someone please explain how I convert the corpus format to make an lsi model? Any help would be much appreciated

Radim Řehůřek

unread,
Jan 15, 2022, 4:41:11 AM1/15/22
to Gensim
Reply all
Reply to author
Forward
0 new messages