mcrisc / lexdecomp

LexDecomp is an implementation of the Answer Selection (AS) model proposed in the paper Sentence Similarity Learning by Lexical Decomposition and Composition, by (Wang et al., 2016).
51 stars 17 forks source link

Question about word2vec2text.py #3

Open xiyubao opened 6 years ago

xiyubao commented 6 years ago

when I was converting GoogleNews-vectors-negative300.bin to GoogleNews-vectors-300d.voc.

Console told me :

D:\academic\LDC\tools>python word2vec2text.py GoogleNews-vectors-negative300.bin GoogleNews-vectors-300d.voc exporting vectors Traceback (most recent call last): File "word2vec2text.py", line 20, in memorymap mapped_file = mmap.mmap(fd, size, access=mmap.ACCESS_READ) OverflowError: cannot fit 'int' into an index-sized integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "word2vec2text.py", line 45, in with memorymap(args.source) as mvec, \ File "D:\academic\python\lib\contextlib.py", line 59, in enter return next(self.gen) File "word2vec2text.py", line 25, in memorymap mapped_file.close() UnboundLocalError: local variable 'mapped_file' referenced before assignment

How should I do?

mcrisc commented 6 years ago

I believe this issue is related to differences between versions of the mmap module for Linux and Windows. My code was only tested on Linux.