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

Commit

Permalink
Fixed an error in the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmun committed Dec 1, 2014
1 parent fb2e1f7 commit c30dd19
Show file tree
Hide file tree
Showing 2 changed files with 1,942 additions and 1,938 deletions.
8 changes: 6 additions & 2 deletions Analysis/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ def dictConvert(self):
#for i, sense in enumerate(senses):
# sense = re.sub(pattern, ' ', sense).lower()
# f_d['-'.join([key, str(i)])] = Counter(sense.split())
sense = ' '.join(senses)
senses = ' '.join(senses)
else:
senses = senses[0]
#else:
# try:
# sense = re.sub(pattern, ' ', senses[0]).lower()
# f_d[key] = Counter(sense.split())
# except IndexError as E:
# f_d[key] = {}
if type(senses) == list:
raise TypeError('senses cannot be a list')
try:
sense = re.sub(pattern, ' ', senses[0]).lower()
sense = re.sub(pattern, ' ', senses).lower()
f_d[key] = Counter(sense.split())
except IndexError as E:
f_d[key] = {}
Expand Down
Loading

0 comments on commit c30dd19

Please sign in to comment.