mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-13 04:02:29 +00:00
Made ANEW paths absolute
This commit is contained in:
parent
18486aa3e0
commit
1ef9dac86a
@ -121,7 +121,7 @@ class EmotionTextPlugin(SentimentPlugin):
|
||||
dictionary={}
|
||||
lang = params.get("language", "auto")
|
||||
if lang == 'es':
|
||||
with open(self._local_path+self.anew_path_es,'rb') as tabfile:
|
||||
with open(self.anew_path_es,'rb') as tabfile:
|
||||
reader = csv.reader(tabfile, delimiter='\t')
|
||||
for row in reader:
|
||||
dictionary[row[2]]={}
|
||||
@ -129,7 +129,7 @@ class EmotionTextPlugin(SentimentPlugin):
|
||||
dictionary[row[2]]['A']=row[5]
|
||||
dictionary[row[2]]['D']=row[7]
|
||||
else:
|
||||
with open(self._local_path+self.anew_path_en,'rb') as tabfile:
|
||||
with open(self.anew_path_en,'rb') as tabfile:
|
||||
reader = csv.reader(tabfile, delimiter='\t')
|
||||
for row in reader:
|
||||
dictionary[row[0]]={}
|
||||
@ -152,4 +152,4 @@ class EmotionTextPlugin(SentimentPlugin):
|
||||
emotions.onyx__hasEmotion.append(emotion1)
|
||||
entry.emotions = [emotions,]
|
||||
|
||||
yield entry
|
||||
yield entry
|
||||
|
Loading…
Reference in New Issue
Block a user