From 6557b849732b314570ea9d5132f1731d964e2fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= Date: Wed, 22 Jul 2020 20:38:18 +0200 Subject: [PATCH] Prod flake8 with a coding style violation in a docstring --- gensim/similarities/termsim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gensim/similarities/termsim.py b/gensim/similarities/termsim.py index 62d13a0684..d90bf586f8 100644 --- a/gensim/similarities/termsim.py +++ b/gensim/similarities/termsim.py @@ -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 @@ -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