是否可以解决 BrokenPipeError: [Errno 32] 在 LDA 模型中损坏的管道?

问题描述

当我使用 CoherenceModel 时,出现 brokenPipeError: [Errno 32] broken pipe 错误。 特别是在 coherence='c_v' 中,会发生此错误。 当我选择参数为“u_ma​​ss”时,不会发生这种情况 是否可以解决 brokenPipeError: [Errno 32] broken pipe in LDA 模型?

model = Ldamodel(corpus=corpus,id2word=dictionary,num_topics=num_topics) 
model_list.append(model) 
coherencemodel = CoherenceModel(model=model,texts=texts,dictionary=dictionary,coherence='c_v') 
coherence_values.append(coherencemodel.get_coherence()) 

brokenPipeError                           Traceback (most recent call last)
<ipython-input-8-33bbdf4a0b18> in <module>
     57     logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s',level=logging.INFO)
     58     # optimize
---> 59     find_optimal_number_of_topics(dictionary,corpus,processed_data)
     60 

<ipython-input-8-33bbdf4a0b18> in find_optimal_number_of_topics(dictionary,processed_data)
     37     step = 6;
     38 
---> 39     model_list,coherence_values = compute_coherence_values(dictionary=dictionary,corpus=corpus,texts=processed_data,start=start,limit=limit,step=step)
     40     x = range(start,limit,step)
     41     plt.plot(x,coherence_values)

<ipython-input-8-33bbdf4a0b18> in compute_coherence_values(dictionary,texts,start,step)
     29         model_list.append(model)
     30         coherencemodel = CoherenceModel(model=model,coherence='c_v')
---> 31         coherence_values.append(coherencemodel.get_coherence())
     32         return model_list,coherence_values
     33 

.........


D:\choi\lib\multiprocessing\context.py in _Popen(process_obj)
    320         def _Popen(process_obj):
    321             from .popen_spawn_win32 import Popen
--> 322             return Popen(process_obj)
    323 
    324     class SpawnContext(BaseContext):

D:\choi\lib\multiprocessing\popen_spawn_win32.py in __init__(self,process_obj)
     87             try:
     88                 reduction.dump(prep_data,to_child)
---> 89                 reduction.dump(process_obj,to_child)
     90             finally:
     91                 set_spawning_popen(None)

D:\choi\lib\multiprocessing\reduction.py in dump(obj,file,protocol)
     58 def dump(obj,protocol=None):
     59     '''Replacement for pickle.dump() using ForkingPickler.'''
---> 60     ForkingPickler(file,protocol).dump(obj)
     61 
     62 #

brokenPipeError: [Errno 32] broken pipe

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...