From 51b4737c43945c118489453afb52dffb8ab9282b Mon Sep 17 00:00:00 2001 From: militarpancho Date: Tue, 31 Jan 2017 11:22:28 +0100 Subject: [PATCH] Change paths to wordnet files. Deleted loading from local path to load dictionarios from absolute paths --- emotion-wnaffect/emotion-wnaffect.py | 6 +++--- emotion-wnaffect/emotion-wnaffect.senpy | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/emotion-wnaffect/emotion-wnaffect.py b/emotion-wnaffect/emotion-wnaffect.py index a1e23f0..c7ff343 100644 --- a/emotion-wnaffect/emotion-wnaffect.py +++ b/emotion-wnaffect/emotion-wnaffect.py @@ -37,9 +37,9 @@ class EmotionTextPlugin(EmotionPlugin): 'joy': 'joy', 'sadness': 'sadness'} - self._load_emotions(local_path+self.info['hierarchy_path']) - self._total_synsets = self._load_synsets(local_path+self.info['synsets_path']) - self._wn16_path = local_path+self.info['wn16_path'] + self._load_emotions(self.info['hierarchy_path']) + self._total_synsets = self._load_synsets(self.info['synsets_path']) + self._wn16_path = self.info['wn16_path'] self._wn16= None self._wn16 = WordNetCorpusReader(os.path.abspath("{0}".format(self._wn16_path)), nltk.data.find(self._wn16_path)) diff --git a/emotion-wnaffect/emotion-wnaffect.senpy b/emotion-wnaffect/emotion-wnaffect.senpy index d3e30da..db8aef8 100644 --- a/emotion-wnaffect/emotion-wnaffect.senpy +++ b/emotion-wnaffect/emotion-wnaffect.senpy @@ -13,9 +13,9 @@ } }, "requirements": {}, - "synsets_path": "/a-synsets.xml", - "hierarchy_path": "/a-hierarchy.xml", - "wn16_path": "/wordnet1.6/dict", + "synsets_path": "/senpy-plugins-data/emotion-wnaffect/a-synsets.xml", + "hierarchy_path": "/senpy-plugins-data/emotion-wnaffect/a-hierarchy.xml", + "wn16_path": "/senpy-plugins-data/emotion-wnaffect/wordnet1.6/dict", "requirements": [ "nltk>=3.0.5", "numpy>=1.8.2",