Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Changed code to leave NA when the word does not exist in all lexica.
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmun committed Dec 1, 2014
1 parent c30dd19 commit e45ad2b
Show file tree
Hide file tree
Showing 2 changed files with 1,804 additions and 2,022 deletions.
4 changes: 2 additions & 2 deletions Analysis/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def similarity(self):
index=self.df.index,
columns=self.df.index)
try:
self.average[pos] = (self.average[pos] + self.scores[lang][pos]).fillna(1)
self.average[pos] = (self.average[pos] + self.scores[lang][pos])
except:
self.average[pos] = self.scores[lang][pos].fillna(1)
self.average[pos] = self.scores[lang][pos]
self.average[pos] = self.average[pos]/7
#scores = defaultdict(dict)
#count = 0
Expand Down
Loading

0 comments on commit e45ad2b

Please sign in to comment.