I am building the vocabulary table using Doc2vec, but there is an error "AttributeError: module 'gensim.utils' has no attribute 'smart_open'". How do I solve this?
This is for a notebook on Databricks platform, running in Python 3. In the past, I've tried on running the code on a local Jupyter Notebook but the same error occurred.
I've also searched https://radimrehurek.com/gensim/models/doc2vec.html but could not find anything related to smart_open.
model = Doc2Vec(window=5, min_count=1, size=50, sample=1e-5, negative=5, workers=1)
model.build_vocab(sentences.to_array())
I ran the above lines separately. The first line worked fine. The second says: AttributeError: module 'gensim.utils' has no attribute 'smart_open'