gsi-upm / senpy-plugins-community

Open source senpy plugins
Apache License 2.0
6 stars 6 forks source link

emotion-wnaffect missing xml file #12

Open derek-maurer opened 3 years ago

derek-maurer commented 3 years ago

Hello! I went through the setup instructions, but it appears I'm missing a required XML file. Does this XML file come from the data submodule or is it generated? I did find this issue (https://github.com/gsi-upm/senpy-plugins-community/issues/11#issuecomment-398704519) where the answer appears to say that the XML file is generated when starting the project.

community_1 | 2020-07-28 16:03:11,628 INFO senpy.extensions Activating plugin: emotion-wnaffect community_1 | 2020-07-28 16:03:11,629 ERROR senpy.extensions Could not activate emotion-wnaffect: File does not exist: a-hierarchy.xml

Thanks, Derek

balkian commented 3 years ago

Hello, @HomeSchoolDev!

Some of the plugins require additional files (See the README). In particular, WN-Affect plugin requires WN-Affect, which you can request here: http://wndomains.fbk.eu/download.html

Once you obtain the file, you will need to copy it to a folder (e.g., data) and tell senpy where that folder is located (senpy --data-folder $PWD/data). Although if you use the default folder (./data) I believe you can skip the second step.

Hope that helps.

derek-maurer commented 3 years ago

Hi @balkian, thanks for the reply!

I downloaded the files you mentioned and dropped them in my default data folder. Then updated the docker-compose.yml file to remove the comment on the default data line. It now looks like this:

`version: '3' services: community: build: . image: "${IMAGEWTAG:-gsi-upm/senpy-community:dev}" volumes:

These were my results:

root@metis-qa:/var/www/html/senpy-plugins-community/data# pwd /var/www/html/senpy-plugins-community/data root@metis-qa:/var/www/html/senpy-plugins-community/data# ls a-hierarchy.xml a-synsets-30.xml a-synsets.xml root@metis-qa:/var/www/html/senpy-plugins-community/data# cd .. root@metis-qa:/var/www/html/senpy-plugins-community# docker-compose up Starting senpy-plugins-community_community_1 ... done Attaching to senpy-plugins-community_community_1 community_1 | /usr/local/lib/python3.6/site-packages/gsitk/datasets/utils.py:41: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. community_1 | info = yaml.load(f) community_1 | 2020-07-28 19:46:01,842 INFO senpy.extensions Installing dependencies community_1 | Senpy version 1.0.1 community_1 | 3.6.9 (default, Jul 13 2019, 14:51:44) community_1 | [GCC 8.3.0] community_1 | Found 13 plugins: community_1 | Ekman2FSRE @ 0.2 -> /usr/src/app/senpy/plugins/postprocessing/emotion/centroids.py community_1 | Ekman2PAD @ 0.2 -> /usr/src/app/senpy/plugins/postprocessing/emotion/centroids.py community_1 | emotion-anew @ 0.5.2 -> /senpy-plugins/emotion-anew/emotion-anew.py community_1 | emotion-depechemood @ 0.1 -> /senpy-plugins/emotion-depechemood/depechemood_plugin.py community_1 | emotion-wnaffect @ 0.2 -> /senpy-plugins/emotion-wnaffect/emotion-wnaffect.py community_1 | example-plugin @ 0.1 -> /senpy-plugins/example-plugin/example_plugin.py community_1 | maxemotion @ 0.1 -> /usr/src/app/senpy/plugins/postprocessing/emotion/maxEmotion_plugin.py community_1 | senticnet @ 0.1 -> /senpy-plugins/sentiment-senticnet/senticnet_plugin.py community_1 | sentiment-basic @ 0.1.1 -> /senpy-plugins/sentiment-basic/sentiment-basic.py community_1 | sentiment-meaningcloud @ 1.1 -> /senpy-plugins/sentiment-meaningCloud/meaningcloud_plugin.py community_1 | sentiment-vader @ 0.1.1 -> /senpy-plugins/sentiment-vader/vader_plugin.py community_1 | sentiment140 @ 0.2 -> /usr/src/app/senpy/plugins/sentiment/sentiment140_plugin.py community_1 | split @ 0.3 -> /usr/src/app/senpy/plugins/misc/split_plugin.py community_1 | [nltk_data] Downloading package wordnet to /root/nltk_data... community_1 | [nltk_data] Package wordnet is already up-to-date! community_1 | [nltk_data] Downloading package omw to /root/nltk_data... community_1 | [nltk_data] Package omw is already up-to-date! community_1 | [nltk_data] Downloading package stopwords to /root/nltk_data... community_1 | [nltk_data] Package stopwords is already up-to-date! community_1 | [nltk_data] Downloading package punkt to /root/nltk_data... community_1 | [nltk_data] Package punkt is already up-to-date! community_1 | [nltk_data] Downloading package averaged_perceptron_tagger to community_1 | [nltk_data] /root/nltk_data... community_1 | [nltk_data] Package averaged_perceptron_tagger is already up-to- community_1 | [nltk_data] date! community_1 | 2020-07-28 19:46:02,324 INFO senpy.extensions Activating plugin: maxemotion community_1 | 2020-07-28 19:46:02,325 INFO senpy.extensions Plugin activated: maxemotion community_1 | 2020-07-28 19:46:02,326 INFO senpy.extensions Activating plugin: Ekman2FSRE community_1 | 2020-07-28 19:46:02,326 INFO senpy.extensions Plugin activated: Ekman2FSRE community_1 | 2020-07-28 19:46:02,327 INFO senpy.extensions Activating plugin: Ekman2PAD community_1 | 2020-07-28 19:46:02,327 INFO senpy.extensions Plugin activated: Ekman2PAD community_1 | 2020-07-28 19:46:02,327 INFO senpy.extensions Activating plugin: sentiment140 community_1 | 2020-07-28 19:46:02,328 INFO senpy.extensions Plugin activated: sentiment140 community_1 | 2020-07-28 19:46:02,328 INFO senpy.extensions Activating plugin: split community_1 | 2020-07-28 19:46:02,329 INFO senpy.extensions Plugin activated: split community_1 | 2020-07-28 19:46:02,329 INFO senpy.extensions Activating plugin: sentiment-vader community_1 | 2020-07-28 19:46:02,330 INFO senpy.extensions Plugin activated: sentiment-vader community_1 | 2020-07-28 19:46:02,330 INFO senpy.extensions Activating plugin: emotion-depechemood community_1 | /senpy-plugins/emotion-depechemood/depechemood_plugin.py:119: UserWarning: DataFrame columns are not unique, some columns will be omitted. community_1 | lexicon = lexicon.T.to_dict() community_1 | 2020-07-28 19:46:06,841 INFO senpy.extensions Plugin activated: emotion-depechemood community_1 | 2020-07-28 19:46:06,843 INFO senpy.extensions Activating plugin: emotion-wnaffect community_1 | 2020-07-28 19:46:06,844 ERROR senpy.extensions Could not activate emotion-wnaffect: File does not exist: a-hierarchy.xml community_1 | 2020-07-28 19:46:06,844 INFO senpy.extensions Activating plugin: emotion-anew community_1 | 2020-07-28 19:46:06,845 ERROR senpy.extensions Could not activate emotion-anew: File does not exist: Dictionary/Redondo(2007).csv community_1 | 2020-07-28 19:46:06,845 INFO senpy.extensions Activating plugin: senticnet community_1 | 2020-07-28 19:46:06,846 INFO senpy.extensions Plugin activated: senticnet community_1 | 2020-07-28 19:46:06,846 INFO senpy.extensions Activating plugin: example-plugin community_1 | 2020-07-28 19:46:06,847 INFO senpy.extensions Plugin activated: example-plugin community_1 | 2020-07-28 19:46:06,847 INFO senpy.extensions Activating plugin: sentiment-basic community_1 | 2020-07-28 19:46:06,848 ERROR senpy.extensions Could not activate sentiment-basic: File does not exist: SentiWordNet_3.0.txt community_1 | 2020-07-28 19:46:06,848 INFO senpy.extensions Activating plugin: sentiment-meaningcloud community_1 | 2020-07-28 19:46:06,848 INFO senpy.extensions Plugin activated: sentiment-meaningcloud community_1 | Senpy version 1.0.1 community_1 | Server running on port 0.0.0.0:5000. Ctrl+C to quit community_1 | * Serving Flask app "__main__" (lazy loading) community_1 | * Environment: production community_1 | WARNING: This is a development server. Do not use it in a production deployment. community_1 | Use a production WSGI server instead. community_1 | * Debug mode: off community_1 | 2020-07-28 19:46:06,877 INFO werkzeug * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

balkian commented 3 years ago

There are two things you can try. Rename "data" to "senpy_data", or add this to your docker-compose:

environment:
  - "SENPY_DATA=/data"