1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-14 12:42:27 +00:00

Change paths to wordnet files. Deleted loading from local path to load dictionarios from absolute paths

This commit is contained in:
militarpancho 2017-01-31 11:22:28 +01:00
parent 140ea9c159
commit 51b4737c43
2 changed files with 6 additions and 6 deletions

View File

@ -37,9 +37,9 @@ class EmotionTextPlugin(EmotionPlugin):
'joy': 'joy', 'joy': 'joy',
'sadness': 'sadness'} 'sadness': 'sadness'}
self._load_emotions(local_path+self.info['hierarchy_path']) self._load_emotions(self.info['hierarchy_path'])
self._total_synsets = self._load_synsets(local_path+self.info['synsets_path']) self._total_synsets = self._load_synsets(self.info['synsets_path'])
self._wn16_path = local_path+self.info['wn16_path'] self._wn16_path = self.info['wn16_path']
self._wn16= None self._wn16= None
self._wn16 = WordNetCorpusReader(os.path.abspath("{0}".format(self._wn16_path)), nltk.data.find(self._wn16_path)) self._wn16 = WordNetCorpusReader(os.path.abspath("{0}".format(self._wn16_path)), nltk.data.find(self._wn16_path))

View File

@ -13,9 +13,9 @@
} }
}, },
"requirements": {}, "requirements": {},
"synsets_path": "/a-synsets.xml", "synsets_path": "/senpy-plugins-data/emotion-wnaffect/a-synsets.xml",
"hierarchy_path": "/a-hierarchy.xml", "hierarchy_path": "/senpy-plugins-data/emotion-wnaffect/a-hierarchy.xml",
"wn16_path": "/wordnet1.6/dict", "wn16_path": "/senpy-plugins-data/emotion-wnaffect/wordnet1.6/dict",
"requirements": [ "requirements": [
"nltk>=3.0.5", "nltk>=3.0.5",
"numpy>=1.8.2", "numpy>=1.8.2",