Closed sidgitind closed 4 years ago
Hi, I have trained the corextopic model and trying to predict the topic for a text document. My code for prediction is given below
with open('textdata.txt', 'r') as file: text_data = file.read().replace('\n', ' ') doc_word1 = vectorizer.transform([text_data]) doc_word1 = ss.csr_matrix(doc_word1) anchored_topic_model.predict(doc_word1)
and the snipper from error log is
--> 517 raise ValueError('dimension mismatch') 518 519 result = self._mul_multivector(np.asarray(other)) ValueError: dimension mismatch
Can somebody help in this? Thanks
Have pointed out the error as comments in other issue. So closing this.
Hi, I have trained the corextopic model and trying to predict the topic for a text document. My code for prediction is given below
and the snipper from error log is
Can somebody help in this? Thanks