I\'m getting an error while trying to access gensims mallet in jupyter notebooks. I have the specified file \'mallet\' in the same folder as my notebook, but cant seem to acces
Make sure you installed the Java Developers Kit (JDK).
The credit goes to this another answer
After installing the JDK, the following codes for the LDA Mallet worked like charm!
import os
from gensim.models.wrappers import LdaMallet
os.environ.update({'MALLET_HOME':r'C:/mallet/mallet-2.0.8/'})
mallet_path = r'C:/mallet/mallet-2.0.8/bin/mallet.bat'
lda_mallet = LdaMallet(
mallet_path,
corpus = corpus_bow,
num_topics = n_topics,
id2word = dct,
)