> Thanks for your quick reply.
>
> I understand what you are saying but what I meant to ask is something
> different.
>
> Actually, my input file is in a different format, and there is no
> word-id mapping. I have a file where there are d columns and n rows,
> each row has d entries seperated by tab. I can do the preprocessing, and
> convert it in the format of LSI example (sparse), but I would rather not
> do it if can be avoided.
>
> so what I would like to do is:
> lsi = gensim.models.lsimodel.LsiModel(corpus=mm, id2word=id2word,
> num_topics=400)
>
> where there is no id2word mapping; and if nm is something that can be
> created from the input file that I described above?
You don't need the id2word mapping. It's there mostly for debugging models -- you can just pass `id2word=gensim.utils.FakeDict(d)` in there, if `d` is the total number of features.
The models only accept vectors in the [(feature_id, feature_weight)] sparse format. So even if your data format is dense, you'd still need to pass `zip(range(d), row)` as a document.
HTH,
Radim
>
>
> Arvind
> --
> Arvind Agarwal
> PhD Student, Computer Science
> University of Maryland, College Park
>
http://www.umiacs.umd.edu/~arvinda/
>
>
>
>
>