Closed s-jse closed 3 months ago
I installed fastopic by running pip install fastopic
fastopic
pip install fastopic
Then the example from README:
from fastopic import FASTopic from sklearn.datasets import fetch_20newsgroups from topmost.preprocessing import Preprocessing docs = fetch_20newsgroups(subset='all', remove=('headers', 'footers', 'quotes'))['data'] preprocessing = Preprocessing(vocab_size=10000) model = FASTopic(50, preprocessing) topic_top_words, doc_topic_dist = model.fit_transform(docs) print(topic_top_words) print(doc_topic_dist)
Gives this error:
File "/home/user/fastopic/test.py", line 11, in <module> topic_top_words, doc_topic_dist = model.fit_transform(docs) File "/home/user/anaconda3/envs/fastopic/lib/python3.10/site-packages/fastopic/FASTopic.py", line 81, in fit_transform dataset = RawDatasetHandler(docs, self.preprocessing, device=self.device, as_tensor=True, pretrained_WE=False) TypeError: RawDatasetHandler.__init__() got an unexpected keyword argument 'pretrained_WE'
Follow up: Installing topmost from its main branch (instead of the latest released version on Pypi) resolved this issue.
topmost
Thank you. We've released a new version of topmost.
I installed
fastopic
by runningpip install fastopic
Then the example from README:
Gives this error:
System