Skip to content

Commit

Permalink
Don't do nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 24, 2017
1 parent eb279cb commit 659c3fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v7/similarity/similarity.py
Expand Up @@ -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]
Expand Down

0 comments on commit 659c3fd

Please sign in to comment.