You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.8/dist-packages/pke/unsupervised/graph_based/single_tpr.py in candidate_weighting(self, window, pos, lda_model, normalized)
168 for word in self.graph.nodes():
169 if word in dictionary:
--> 170 index = dictionary.index(word)
171 distribution_word_topic = [distributions[k][index] for k
172 in range(K)]
AttributeError: 'numpy.ndarray' object has no attribute 'index'
The text was updated successfully, but these errors were encountered:
Thanks for the info, I found the bug: in 8f1d05d we changed from tf_vectorizer.get_feature_names() to tf_vectorizer.get_feature_names_out() but the return value changed from list to np.ndarray which was not taken into account. I'm on it.
Good afternoon. I occurred with an error when working with TopicalPageRank in the step of candidates extraction. Here:
elif model.name in ["TopicalPageRank"]:
extractor.candidate_weighting(lda_model=lda_model)
I worked with this algorithm in December and it worked ok. But now it gives an error:
AttributeError Traceback (most recent call last)
in
102 extractor.candidate_weighting(df=df)
103 elif model.name in ["TopicalPageRank"]:
--> 104 extractor.candidate_weighting(lda_model=lda_model)
105 else:
106 extractor.candidate_weighting()
/usr/local/lib/python3.8/dist-packages/pke/unsupervised/graph_based/single_tpr.py in candidate_weighting(self, window, pos, lda_model, normalized)
168 for word in self.graph.nodes():
169 if word in dictionary:
--> 170 index = dictionary.index(word)
171 distribution_word_topic = [distributions[k][index] for k
172 in range(K)]
AttributeError: 'numpy.ndarray' object has no attribute 'index'
The text was updated successfully, but these errors were encountered: