Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import changes #360

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'scikit-learn >= 1.2.0',
'gensim >= 4.0.0',
'umap-learn >= 0.5.1',
'hdbscan >= 0.8.27',
'wordcloud',
],
extras_require={
Expand Down
5 changes: 2 additions & 3 deletions top2vec/Top2Vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
from gensim.parsing.preprocessing import strip_tags
from gensim.models.phrases import Phrases
import umap
import hdbscan
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from joblib import dump, load
from sklearn.cluster import dbscan
from sklearn.cluster import dbscan, HDBSCAN
import tempfile
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.preprocessing import normalize
Expand Down Expand Up @@ -1384,7 +1383,7 @@ def compute_topics(self,
labels = cluster.fit_predict(umap_embedding)

else:
cluster = hdbscan.HDBSCAN(**hdbscan_args).fit(umap_embedding)
cluster = HDBSCAN(**hdbscan_args).fit(umap_embedding)
labels = cluster.labels_

# calculate topic vectors from dense areas of documents
Expand Down