0

I wrote the following code, But the following error shows, Please guide me.

from gensim.models.wrappers import LdaMallet
import os
os.environ.update({'MALLET_HOME':r'C:/mallet'})
mallet_path = 'C:/mallet/bin/mallet'

ldamallet = gensim.models.wrappers.LdaMallet(mallet_path, corpus=corpus, num_topics=20, id2word=id2word)

Error:

Command 'C:/mallet/bin/mallet import-file --preserve-case --keep-sequence --remove-stopwords --token-regex "\S+" --input C:\Users\MHRADM~1\AppData\Local\Temp\316a7f_corpus.txt --output C:\Users\MHRADM~1\AppData\Local\Temp\316a7f_corpus.mallet' returned non-zero exit status 1.

webprogrammer
  • 2,393
  • 3
  • 21
  • 27
MeisaM
  • 1
  • 1
  • Try: `mallet_path = 'C:/mallet/bin/mallet.bat'` as in https://stackoverflow.com/questions/56363181/saved-gensim-ldamallet-model-not-working-in-different-console – sophros Feb 13 '20 at 18:11
  • Duplicate: https://stackoverflow.com/questions/52845345/lda-mallet-calledprocesserror – sophros Feb 13 '20 at 18:20

0 Answers0