Skip to content
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
14 changes: 7 additions & 7 deletions lda2vec/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import dirichlet_likelihood
import embed_mixture
import tracking
import preprocess
import corpus
import topics
import negative_sampling
import lda2vec.dirichlet_likelihood
import lda2vec.embed_mixture
import lda2vec.tracking
import lda2vec.preprocess
import lda2vec.corpus
import lda2vec.topics
import lda2vec.negative_sampling

dirichlet_likelihood = dirichlet_likelihood.dirichlet_likelihood
EmbedMixture = embed_mixture.EmbedMixture
Expand Down
2 changes: 1 addition & 1 deletion lda2vec/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def compact_word_vectors(self, vocab, filename=None, array=None,
choice = np.array(keys_raw)[idx][np.argmin(d)]
# choice = difflib.get_close_matches(word, choices)[0]
vector = model[choice]
print compact, word, ' --> ', choice
print(compact, word, ' --> ', choice)
except IndexError:
pass
if vector is None:
Expand Down
2 changes: 1 addition & 1 deletion lda2vec/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from spacy.en import English
from spacy.lang.en import English
from spacy.attrs import LOWER, LIKE_URL, LIKE_EMAIL

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion lda2vec/topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def print_top_words_per_topic(data, top_n=10, do_print=True):
top_words = [data['vocab'][i].strip().replace(' ', '_') for i in top]
msg = ' '.join(top_words)
if do_print:
print prefix + msg
print(prefix + msg)
lists.append(top_words)
return lists

Expand Down