Skip to content

Commit

Permalink
Prod flake8 with a coding style violation in a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jul 22, 2020
1 parent ab41346 commit 6557b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gensim/similarities/termsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ class SparseTermSimilarityMatrix(SaveLoad):
>>> from gensim.models import Word2Vec, WordEmbeddingSimilarityIndex
>>> from gensim.similarities import SoftCosineSimilarity, SparseTermSimilarityMatrix
>>> from gensim.similarities.index import AnnoyIndexer
>>> from scikits.sparse.cholmod import cholesky
>>>
>>> model = Word2Vec(common_texts, size=20, min_count=1) # train word-vectors
>>> annoy = AnnoyIndexer(model, num_trees=2) # use annoy for faster word similarity lookups
Expand All @@ -144,6 +143,8 @@ class SparseTermSimilarityMatrix(SaveLoad):
>>> query = 'graph trees computer'.split() # make a query
>>> sims = docsim_index[dictionary.doc2bow(query)] # calculate similarity of query to each doc from bow_corpus
>>>
>>> from scikits.sparse.cholmod import cholesky
>>>
>>> word_embeddings = cholesky(similarity_matrix.matrix).L() # obtain word embeddings from similarity matrix
Check out `Tutorial Notebook
Expand Down

0 comments on commit 6557b84

Please sign in to comment.