Skip to content
Permalink
Browse files

Don't do nonsense

  • Loading branch information
ralsina committed May 24, 2017
1 parent eb279cb commit 659c3fd1fe8d82522fed36b3765038f0a15b4edd
Showing with 2 additions and 2 deletions.
  1. +2 −2 v7/similarity/similarity.py
@@ -93,10 +93,10 @@ def create_idx(indexes, dictionaries, lsis, lang):
dictionaries[lang] = dictionary
lsis[lang] = lsi

def write_similar(path, p, lang, indexes=indexes, dictionaries=dictionaries, lsis=lsis):
def write_similar(path, post, lang, indexes=indexes, dictionaries=dictionaries, lsis=lsis):
if lang not in dictionaries:
create_idx(indexes, dictionaries, lsis, lang)
doc = split_text(p.text(lang), lang)
doc = split_text(post.text(lang), lang)
vec_bow = dictionaries[lang].doc2bow(doc)
vec_lsi = lsis[lang][vec_bow]
body_sims = indexes[lang][vec_lsi]

0 comments on commit 659c3fd

Please sign in to comment.