Gensim: random slice of mm corpus broken on conda?

Created on 14 Dec 2016  路  2Comments  路  Source: RaRe-Technologies/gensim

I think there's an issue with the conda package of 13.3 - I can't take a random slice of an mm corpus

corpus = gensim.corpora.MmCorpus('./corpus.mm')
corpus[np.asarray([4, 10, 3, 16])]

fails with an error

gensim/matutils.py in docbyoffset(self, offset)
677 previd, document = -1, []
678 for line in fin:
--> 679 docid, termid, val = line.split()
680 if not self.transposed:
681 termid, docid = docid, termid
ValueError: not enough values to unpack (expected 3, got 2)

Installing straight from github using pip install this problem goes away. Can anyone confirm this issue?

Using Ubuntu 16.04 and Python 3.5

bug

Most helpful comment

I think the conda recipe for Gensim is quite old and hasn't been maintained for quite some time. We are looking to push the recipe though conda-forge channel, which should help in maintainance.

All 2 comments

I think the conda recipe for Gensim is quite old and hasn't been maintained for quite some time. We are looking to push the recipe though conda-forge channel, which should help in maintainance.

Was this page helpful?
0 / 5 - 0 ratings