Skip to content

Commit

Permalink
Fix obvious bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 24, 2017
1 parent 191d757 commit 967c6fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions v7/similarity/similarity.py
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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.