THULAC-Python icon indicating copy to clipboard operation
THULAC-Python copied to clipboard

MemoryError错误

Open SuPerCxyz opened this issue 8 years ago • 2 comments

当我运行thu1 = thulac.thulac()时python会一下子占用3G的内存资源,并最后显示MemoryError,麻烦问一下这是我内存不够的原因还是其他原因。 system:centos7_mini_x86_64_1708 python:2.7.5

SuPerCxyz avatar Oct 14 '17 07:10 SuPerCxyz

我也碰到了, 在windows 上跑会出现, ubuntu 上不会出现

Traceback (most recent call last): File "D:/workspace/code/service-catalog/services/search/views.py", line 9, in <module> thu1 = thulac.thulac() # 默认模式 File "C:\Python27\lib\site-packages\thulac\__init__.py", line 63, in __init__ self.__tagging_decoder.init((self.__prefix+"model_c_model.bin"),(self.__prefix+"model_c_dat.bin"),(self.__prefix+"model_c_label.txt")) File "C:\Python27\lib\site-packages\thulac\character\CBTaggingDecoder.py", line 36, in init self.model = CBModel(modelFile) File "C:\Python27\lib\site-packages\thulac\character\CBModel.py", line 58, in __init__ self.fl_weights = struct.unpack("<"+str(self.f_size * self.l_size)+"i", temp) MemoryError

Allen-yan avatar Oct 19 '17 10:10 Allen-yan

我也碰到了这个问题,感觉是python版本的问题,使用64位的python应该就解决了.

crazyxw avatar Mar 27 '18 06:03 crazyxw