当尝试从Gensim软件包中获取主题建模的一致性得分时,出现此错误。该错误似乎与语法无关:
coherence_lda_gens = CoherenceModel(model=lda_gens,
texts=data_lemmatized, dictionary=dict_lemm, coherence='c_v')
coherence = coherence_lda_gens.get_coherence() #this line fails*emphasized text*
print('\nCoherence Score: ',coherence)
我收到此错误:
File "C:\Users\msharifpour\AppData\Local\Continuum\anaconda3\lib\multiprocessing\spawn.py", line 172, in get_preparation_data
main_mod_name = getattr(main_module.__spec__, "name", None)
AttributeError: module '__main__' has no attribute '__spec__'
我在这个问题上进行了很多搜索,但是找不到问题的根源和解决方法?
谢谢