Skip to content
Permalink
Browse files

Fix obvious bug

  • Loading branch information
ralsina committed May 24, 2017
1 parent 191d757 commit 967c6fca999dc9c8befc44315258539b7f3bc039
Showing with 1 addition and 4 deletions.
  1. +1 −4 v7/similarity/similarity.py
@@ -92,8 +92,7 @@ def create_idx(indexes, dictionaries, lsis, lang):
dictionary = gensim.corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
lsi = gensim.models.LsiModel(corpus, id2word=dictionary, num_topics=2)
index = gensim.similarities.MatrixSimilarity(lsi[corpus])
indexes[lang] = indexes
indexes[lang] = gensim.similarities.MatrixSimilarity(lsi[corpus])
dictionaries[lang] = dictionary
lsis[lang] = lsi

@@ -121,7 +120,6 @@ def write_similar(path, p, lang, indexes=indexes, dictionaries=dictionaries, lsi
with open(path, 'w+') as outf:
json.dump(data, outf)


for lang in self.site.translations:
file_dep = []
for p in self.site.timeline:
@@ -137,4 +135,3 @@ def write_similar(path, p, lang, indexes=indexes, dictionaries=dictionaries, lsi
'uptodate': [utils.config_changed({1: kw}, 'similarity')],
}
yield task

0 comments on commit 967c6fc

Please sign in to comment.