mirror of
				https://github.com/gsi-upm/senpy
				synced 2025-11-04 09:18:16 +00:00 
			
		
		
		
	Made ANEW paths absolute
This commit is contained in:
		@@ -121,7 +121,7 @@ class EmotionTextPlugin(SentimentPlugin):
 | 
				
			|||||||
        dictionary={}
 | 
					        dictionary={}
 | 
				
			||||||
        lang = params.get("language", "auto")
 | 
					        lang = params.get("language", "auto")
 | 
				
			||||||
        if lang == 'es':
 | 
					        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')
 | 
					                reader = csv.reader(tabfile, delimiter='\t')
 | 
				
			||||||
                for row in reader:
 | 
					                for row in reader:
 | 
				
			||||||
                    dictionary[row[2]]={}
 | 
					                    dictionary[row[2]]={}
 | 
				
			||||||
@@ -129,7 +129,7 @@ class EmotionTextPlugin(SentimentPlugin):
 | 
				
			|||||||
                    dictionary[row[2]]['A']=row[5]
 | 
					                    dictionary[row[2]]['A']=row[5]
 | 
				
			||||||
                    dictionary[row[2]]['D']=row[7]
 | 
					                    dictionary[row[2]]['D']=row[7]
 | 
				
			||||||
        else:
 | 
					        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')
 | 
					                reader = csv.reader(tabfile, delimiter='\t')
 | 
				
			||||||
                for row in reader:
 | 
					                for row in reader:
 | 
				
			||||||
                    dictionary[row[0]]={}
 | 
					                    dictionary[row[0]]={}
 | 
				
			||||||
@@ -152,4 +152,4 @@ class EmotionTextPlugin(SentimentPlugin):
 | 
				
			|||||||
        emotions.onyx__hasEmotion.append(emotion1)
 | 
					        emotions.onyx__hasEmotion.append(emotion1)
 | 
				
			||||||
        entry.emotions = [emotions,]
 | 
					        entry.emotions = [emotions,]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        yield entry
 | 
					        yield entry
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user