From a0abbede49824c52f19685f6d5c8ef3235035765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Fri, 20 May 2022 12:51:01 +0200 Subject: [PATCH] Version 1.0.2 Update RDFlib to 6.1.1 (removed rdflib-jsonld, as it is deprecated) Bumped minimum python version: 3.7 (as a result of RDFLIB 6) Added ProxyFix to run behind nginx (Added --no-proxy to run without the fix) Replaced http media links to protocol-agnostic links in playground Enable CORS (via --enable-cors) Update old urls (replaced *.cluster.gsi.dit.upm.es with *.gsi.upm.es) --- .makefiles/README.md | 4 +- .makefiles/makefiles.mk | 2 +- Makefile | 2 +- README.rst | 2 +- docs/Advanced.ipynb | 42 +++++++------- docs/Quickstart.ipynb | 78 +++++++++++++------------- docs/examples/results/example-pad.json | 2 +- docs/index.rst | 2 +- docs/installation.rst | 2 +- docs/publications.rst | 2 +- docs/vocabularies.rst | 4 +- extra-requirements.txt | 1 + k8s/senpy-ingress.yaml | 2 +- requirements.txt | 3 +- senpy/__main__.py | 20 +++++++ senpy/models.py | 2 +- senpy/schemas/context.jsonld | 8 +-- senpy/static/js/main.js | 2 +- senpy/static/js/nodes.js | 6 +- senpy/templates/index.html | 2 +- setup.py | 5 +- tests/test_blueprints.py | 2 +- tests/test_extensions.py | 6 +- tests/test_semantics.py | 8 +-- 24 files changed, 116 insertions(+), 93 deletions(-) diff --git a/.makefiles/README.md b/.makefiles/README.md index 2ab487e..ac97fcc 100644 --- a/.makefiles/README.md +++ b/.makefiles/README.md @@ -2,7 +2,7 @@ These makefiles are recipes for several common tasks in different types of proje To add them to your project, simply do: ``` -git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git +git remote add makefiles ssh://git@lab.gsi.upm.es:2200/docs/templates/makefiles.git git subtree add --prefix=.makefiles/ makefiles master touch Makefile echo "include .makefiles/base.mk" >> Makefile @@ -16,7 +16,7 @@ include .makefiles/python.mk ``` You may need to set special variables like the name of your project or the python versions you're targetting. -Take a look at each specific `.mk` file for more information, and the `Makefile` in the [senpy](https://lab.cluster.gsi.dit.upm.es/senpy/senpy) project for a real use case. +Take a look at each specific `.mk` file for more information, and the `Makefile` in the [senpy](https://lab.gsi.upm.es/senpy/senpy) project for a real use case. If you update the makefiles from your repository, make sure to push the changes for review in upstream (this repository): diff --git a/.makefiles/makefiles.mk b/.makefiles/makefiles.mk index 60ae8bb..9832a92 100644 --- a/.makefiles/makefiles.mk +++ b/.makefiles/makefiles.mk @@ -1,5 +1,5 @@ makefiles-remote: - git ls-remote --exit-code makefiles 2> /dev/null || git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git + git ls-remote --exit-code makefiles 2> /dev/null || git remote add makefiles ssh://git@lab.gsi.upm.es:2200/docs/templates/makefiles.git makefiles-commit: makefiles-remote git add -f .makefiles diff --git a/Makefile b/Makefile index 8483d2a..dbcced0 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ IMAGENAME=gsiupm/senpy # The first version is the main one (used for quick builds) # See .makefiles/python.mk for more info -PYVERSIONS=3.6 3.7 +PYVERSIONS ?= 3.10 3.7 DEVPORT=5000 diff --git a/README.rst b/README.rst index e8e025e..918e059 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Senpy lets you create sentiment analysis web services easily, fast and using a well known API. -As a bonus, Senpy services use semantic vocabularies (e.g. `NIF `_, `Marl `_, `Onyx `_) and formats (turtle, JSON-LD, xml-rdf). +As a bonus, Senpy services use semantic vocabularies (e.g. `NIF `_, `Marl `_, `Onyx `_) and formats (turtle, JSON-LD, xml-rdf). Have you ever wanted to turn your sentiment analysis algorithms into a service? With Senpy, now you can. diff --git a/docs/Advanced.ipynb b/docs/Advanced.ipynb index d376794..499ae5f 100644 --- a/docs/Advanced.ipynb +++ b/docs/Advanced.ipynb @@ -1275,7 +1275,7 @@ " "@id": "endpoint:plugins/sentiment-basic_0.1.1",\n", " "@type": "SentimentPlugin",\n", " "author": "github.com/nachtkatze",\n", - " "description": "\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\n",\n", + " "description": "\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\n",\n", " "extra_params": {\n", " "language": {\n", " "aliases": [\n", @@ -1303,7 +1303,7 @@ " "@id": "endpoint:plugins/sentiment-meaningcloud_1.1",\n", " "@type": "SentimentPlugin",\n", " "author": "GSI UPM",\n", - " "description": "\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n",\n", + " "description": "\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n",\n", " "extra_params": {\n", " "apikey": {\n", " "aliases": [\n", @@ -1536,7 +1536,7 @@ " \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}endpoint:plugins/sentiment\\PYZhy{}basic\\PYZus{}0.1.1\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}SentimentPlugin\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}author\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}github.com/nachtkatze\\PYZdq{}}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment classifier using rule\\PYZhy{}based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment classifier using rule\\PYZhy{}based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}extra\\PYZus{}params\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}language\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}aliases\\PYZdq{}}\\PY{p}{:} \\PY{p}{[}\n", @@ -1564,7 +1564,7 @@ " \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}endpoint:plugins/sentiment\\PYZhy{}meaningcloud\\PYZus{}1.1\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}SentimentPlugin\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}author\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}GSI UPM\\PYZdq{}}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment analysis with meaningCloud service.\\PYZbs{}nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\PYZbs{}nhttps://www.meaningcloud.com/developer/login\\PYZbs{}n\\PYZbs{}nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\PYZbs{}nExample request:\\PYZbs{}n\\PYZbs{}nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud\\PYZam{}language=en\\PYZam{}apiKey=YOUR\\PYZus{}API\\PYZus{}KEY\\PYZam{}input=I\\PYZpc{}20love\\PYZpc{}20Madrid.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment analysis with meaningCloud service.\\PYZbs{}nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\PYZbs{}nhttps://www.meaningcloud.com/developer/login\\PYZbs{}n\\PYZbs{}nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\PYZbs{}nExample request:\\PYZbs{}n\\PYZbs{}nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud\\PYZam{}language=en\\PYZam{}apiKey=YOUR\\PYZus{}API\\PYZus{}KEY\\PYZam{}input=I\\PYZpc{}20love\\PYZpc{}20Madrid.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}extra\\PYZus{}params\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}apikey\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}aliases\\PYZdq{}}\\PY{p}{:} \\PY{p}{[}\n", @@ -1796,7 +1796,7 @@ " \"@id\": \"endpoint:plugins/sentiment-basic_0.1.1\",\n", " \"@type\": \"SentimentPlugin\",\n", " \"author\": \"github.com/nachtkatze\",\n", - " \"description\": \"\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\n\",\n", + " \"description\": \"\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\n\",\n", " \"extra_params\": {\n", " \"language\": {\n", " \"aliases\": [\n", @@ -1824,7 +1824,7 @@ " \"@id\": \"endpoint:plugins/sentiment-meaningcloud_1.1\",\n", " \"@type\": \"SentimentPlugin\",\n", " \"author\": \"GSI UPM\",\n", - " \"description\": \"\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n\",\n", + " \"description\": \"\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n\",\n", " \"extra_params\": {\n", " \"apikey\": {\n", " \"aliases\": [\n", @@ -2061,7 +2061,7 @@ " "@id": "endpoint:plugins/sentiment-basic_0.1.1",\n", " "@type": "SentimentPlugin",\n", " "author": "github.com/nachtkatze",\n", - " "description": "\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\n",\n", + " "description": "\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\n",\n", " "extra_params": {\n", " "language": {\n", " "aliases": [\n", @@ -2089,7 +2089,7 @@ " "@id": "endpoint:plugins/sentiment-meaningcloud_1.1",\n", " "@type": "SentimentPlugin",\n", " "author": "GSI UPM",\n", - " "description": "\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n",\n", + " "description": "\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n",\n", " "extra_params": {\n", " "apikey": {\n", " "aliases": [\n", @@ -2207,7 +2207,7 @@ " \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}endpoint:plugins/sentiment\\PYZhy{}basic\\PYZus{}0.1.1\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}SentimentPlugin\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}author\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}github.com/nachtkatze\\PYZdq{}}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment classifier using rule\\PYZhy{}based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment classifier using rule\\PYZhy{}based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}extra\\PYZus{}params\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}language\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}aliases\\PYZdq{}}\\PY{p}{:} \\PY{p}{[}\n", @@ -2235,7 +2235,7 @@ " \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}endpoint:plugins/sentiment\\PYZhy{}meaningcloud\\PYZus{}1.1\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}SentimentPlugin\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}author\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}GSI UPM\\PYZdq{}}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment analysis with meaningCloud service.\\PYZbs{}nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\PYZbs{}nhttps://www.meaningcloud.com/developer/login\\PYZbs{}n\\PYZbs{}nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\PYZbs{}nExample request:\\PYZbs{}n\\PYZbs{}nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud\\PYZam{}language=en\\PYZam{}apiKey=YOUR\\PYZus{}API\\PYZus{}KEY\\PYZam{}input=I\\PYZpc{}20love\\PYZpc{}20Madrid.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}description\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}\\PYZbs{}nSentiment analysis with meaningCloud service.\\PYZbs{}nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\PYZbs{}nhttps://www.meaningcloud.com/developer/login\\PYZbs{}n\\PYZbs{}nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\PYZbs{}nExample request:\\PYZbs{}n\\PYZbs{}nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud\\PYZam{}language=en\\PYZam{}apiKey=YOUR\\PYZus{}API\\PYZus{}KEY\\PYZam{}input=I\\PYZpc{}20love\\PYZpc{}20Madrid.\\PYZbs{}n\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}extra\\PYZus{}params\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}apikey\\PYZdq{}}\\PY{p}{:} \\PY{p}{\\PYZob{}}\n", " \\PY{n+nt}{\\PYZdq{}aliases\\PYZdq{}}\\PY{p}{:} \\PY{p}{[}\n", @@ -2352,7 +2352,7 @@ " \"@id\": \"endpoint:plugins/sentiment-basic_0.1.1\",\n", " \"@type\": \"SentimentPlugin\",\n", " \"author\": \"github.com/nachtkatze\",\n", - " \"description\": \"\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.cluster.gsi.dit.upm.es.\\n\",\n", + " \"description\": \"\\nSentiment classifier using rule-based classification for Spanish. Based on english to spanish translation and SentiWordNet sentiment knowledge. This is a demo plugin that uses only some features from the TASS 2015 classifier. To use the entirely functional classifier you can use the service in: http://senpy.gsi.upm.es.\\n\",\n", " \"extra_params\": {\n", " \"language\": {\n", " \"aliases\": [\n", @@ -2380,7 +2380,7 @@ " \"@id\": \"endpoint:plugins/sentiment-meaningcloud_1.1\",\n", " \"@type\": \"SentimentPlugin\",\n", " \"author\": \"GSI UPM\",\n", - " \"description\": \"\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.cluster.gsi.dit.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n\",\n", + " \"description\": \"\\nSentiment analysis with meaningCloud service.\\nTo use this plugin, you need to obtain an API key from meaningCloud signing up here:\\nhttps://www.meaningcloud.com/developer/login\\n\\nWhen you had obtained the meaningCloud API Key, you have to provide it to the plugin, using param apiKey.\\nExample request:\\n\\nhttp://senpy.gsi.upm.es/api/?algo=meaningCloud&language=en&apiKey=YOUR_API_KEY&input=I%20love%20Madrid.\\n\",\n", " \"extra_params\": {\n", " \"apikey\": {\n", " \"aliases\": [\n", @@ -4267,9 +4267,9 @@ " {\n", " "@id": "Emotion0",\n", " "@type": "Emotion",\n", - " "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 4.22,\n", - " "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 5.17,\n", - " "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 5.2,\n", + " "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 4.22,\n", + " "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 5.17,\n", + " "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 5.2,\n", " "prov:wasGeneratedBy": "prefix:Analysis_1563369541.631805"\n", " }\n", " ],\n", @@ -4299,9 +4299,9 @@ " \\PY{p}{\\PYZob{}}\n", " \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion0\\PYZdq{}}\\PY{p}{,}\n", " \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion\\PYZdq{}}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{4.22}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{5.17}\\PY{p}{,}\n", - " \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{5.2}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{4.22}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{5.17}\\PY{p}{,}\n", + " \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{5.2}\\PY{p}{,}\n", " \\PY{n+nt}{\\PYZdq{}prov:wasGeneratedBy\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}prefix:Analysis\\PYZus{}1563369541.631805\\PYZdq{}}\n", " \\PY{p}{\\PYZcb{}}\n", " \\PY{p}{]}\\PY{p}{,}\n", @@ -4330,9 +4330,9 @@ " {\n", " \"@id\": \"Emotion0\",\n", " \"@type\": \"Emotion\",\n", - " \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 4.22,\n", - " \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 5.17,\n", - " \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 5.2,\n", + " \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 4.22,\n", + " \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 5.17,\n", + " \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 5.2,\n", " \"prov:wasGeneratedBy\": \"prefix:Analysis_1563369541.631805\"\n", " }\n", " ],\n", diff --git a/docs/Quickstart.ipynb b/docs/Quickstart.ipynb index 9970f18..655f07a 100644 --- a/docs/Quickstart.ipynb +++ b/docs/Quickstart.ipynb @@ -333,18 +333,18 @@ ".output_html .vm { color: #19177C } /* Name.Variable.Magic */\n", ".output_html .il { color: #666666 } /* Literal.Number.Integer.Long */
@prefix : <http://www.gsi.upm.es/onto/senpy/ns#> .\n",
        "@prefix dc: <http://dublincore.org/2012/06/14/dcelements#> .\n",
-       "@prefix emoml: <http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns#> .\n",
+       "@prefix emoml: <http://www.gsi.upm.es/ontologies/onyx/vocabularies/emotionml/ns#> .\n",
        "@prefix endpoint: <http://senpy.gsi.upm.es/api/> .\n",
        "@prefix fam: <http://vocab.fusepool.info/fam#> .\n",
-       "@prefix marl: <http://www.gsi.dit.upm.es/ontologies/marl/ns#> .\n",
+       "@prefix marl: <http://www.gsi.upm.es/ontologies/marl/ns#> .\n",
        "@prefix nif: <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .\n",
-       "@prefix onyx: <http://www.gsi.dit.upm.es/ontologies/onyx/ns#> .\n",
+       "@prefix onyx: <http://www.gsi.upm.es/ontologies/onyx/ns#> .\n",
        "@prefix prefix: <http://senpy.invalid/> .\n",
        "@prefix prov: <http://www.w3.org/ns/prov#> .\n",
        "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n",
        "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n",
        "@prefix senpy: <http://www.gsi.upm.es/onto/senpy/ns#> .\n",
-       "@prefix wna: <http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#> .\n",
+       "@prefix wna: <http://www.gsi.upm.es/ontologies/wnaffect/ns#> .\n",
        "@prefix xml: <http://www.w3.org/XML/1998/namespace> .\n",
        "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n",
        "\n",
@@ -362,18 +362,18 @@
        "\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/onto/senpy/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{dc:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://dublincore.org/2012/06/14/dcelements\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
-       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{emoml:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
+       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{emoml:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/emotionml/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{endpoint:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://senpy.gsi.upm.es/api/\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{fam:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://vocab.fusepool.info/fam\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
-       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{marl:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.dit.upm.es/ontologies/marl/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
+       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{marl:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/ontologies/marl/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{nif:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://persistence.uni\\PYZhy{}leipzig.org/nlp2rdf/ontologies/nif\\PYZhy{}core\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
-       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{onyx:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.dit.upm.es/ontologies/onyx/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
+       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{onyx:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/ontologies/onyx/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{prefix:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://senpy.invalid/\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{prov:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.w3.org/ns/prov\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{rdf:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.w3.org/1999/02/22\\PYZhy{}rdf\\PYZhy{}syntax\\PYZhy{}ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{rdfs:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.w3.org/2000/01/rdf\\PYZhy{}schema\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{senpy:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/onto/senpy/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
-       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{wna:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.dit.upm.es/ontologies/wnaffect/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
+       "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{wna:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.gsi.upm.es/ontologies/wnaffect/ns\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{xml:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.w3.org/XML/1998/namespace\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\\PY{k}{@prefix}\\PY{+w}{ }\\PY{n+nn}{xsd:}\\PY{+w}{ }\\PY{n+nv}{\\PYZlt{}http://www.w3.org/2001/XMLSchema\\PYZsh{}\\PYZgt{}}\\PY{+w}{ }\\PY{p}{.}\n",
        "\n",
@@ -390,18 +390,18 @@
       "text/plain": [
        "@prefix :  .\n",
        "@prefix dc:  .\n",
-       "@prefix emoml:  .\n",
+       "@prefix emoml:  .\n",
        "@prefix endpoint:  .\n",
        "@prefix fam:  .\n",
-       "@prefix marl:  .\n",
+       "@prefix marl:  .\n",
        "@prefix nif:  .\n",
-       "@prefix onyx:  .\n",
+       "@prefix onyx:  .\n",
        "@prefix prefix:  .\n",
        "@prefix prov:  .\n",
        "@prefix rdf:  .\n",
        "@prefix rdfs:  .\n",
        "@prefix senpy:  .\n",
-       "@prefix wna:  .\n",
+       "@prefix wna:  .\n",
        "@prefix xml:  .\n",
        "@prefix xsd:  .\n",
        "\n",
@@ -1187,9 +1187,9 @@
        "            {\n",
        "              "@id": "Emotion0",\n",
        "              "@type": "Emotion",\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
        "              "prov:wasGeneratedBy": "prefix:Analysis_1563372854.2822595"\n",
        "            }\n",
        "          ],\n",
@@ -1220,9 +1220,9 @@
        "            \\PY{p}{\\PYZob{}}\n",
        "              \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion0\\PYZdq{}}\\PY{p}{,}\n",
        "              \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion\\PYZdq{}}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
        "              \\PY{n+nt}{\\PYZdq{}prov:wasGeneratedBy\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}prefix:Analysis\\PYZus{}1563372854.2822595\\PYZdq{}}\n",
        "            \\PY{p}{\\PYZcb{}}\n",
        "          \\PY{p}{]}\\PY{p}{,}\n",
@@ -1252,9 +1252,9 @@
        "            {\n",
        "              \"@id\": \"Emotion0\",\n",
        "              \"@type\": \"Emotion\",\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
        "              \"prov:wasGeneratedBy\": \"prefix:Analysis_1563372854.2822595\"\n",
        "            }\n",
        "          ],\n",
@@ -1376,9 +1376,9 @@
        "            {\n",
        "              "@id": "Emotion0",\n",
        "              "@type": "Emotion",\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
        "              "prov:wasGeneratedBy": "prefix:Analysis_1563372854.3354168"\n",
        "            }\n",
        "          ],\n",
@@ -1409,9 +1409,9 @@
        "            \\PY{p}{\\PYZob{}}\n",
        "              \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion0\\PYZdq{}}\\PY{p}{,}\n",
        "              \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion\\PYZdq{}}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
        "              \\PY{n+nt}{\\PYZdq{}prov:wasGeneratedBy\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}prefix:Analysis\\PYZus{}1563372854.3354168\\PYZdq{}}\n",
        "            \\PY{p}{\\PYZcb{}}\n",
        "          \\PY{p}{]}\\PY{p}{,}\n",
@@ -1441,9 +1441,9 @@
        "            {\n",
        "              \"@id\": \"Emotion0\",\n",
        "              \"@type\": \"Emotion\",\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
        "              \"prov:wasGeneratedBy\": \"prefix:Analysis_1563372854.3354168\"\n",
        "            }\n",
        "          ],\n",
@@ -1572,9 +1572,9 @@
        "            {\n",
        "              "@id": "Emotion0",\n",
        "              "@type": "Emotion",\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
-       "              "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal": 6.44,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance": 7.11,\n",
+       "              "http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence": 8.72,\n",
        "              "prov:wasGeneratedBy": "prefix:Analysis_1563372854.3876536"\n",
        "            }\n",
        "          ],\n",
@@ -1605,9 +1605,9 @@
        "            \\PY{p}{\\PYZob{}}\n",
        "              \\PY{n+nd}{\\PYZdq{}@id\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion0\\PYZdq{}}\\PY{p}{,}\n",
        "              \\PY{n+nd}{\\PYZdq{}@type\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}Emotion\\PYZdq{}}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
-       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}arousal\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{6.44}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}dominance\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{7.11}\\PY{p}{,}\n",
+       "              \\PY{n+nt}{\\PYZdq{}http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns\\PYZsh{}valence\\PYZdq{}}\\PY{p}{:} \\PY{l+m+mf}{8.72}\\PY{p}{,}\n",
        "              \\PY{n+nt}{\\PYZdq{}prov:wasGeneratedBy\\PYZdq{}}\\PY{p}{:} \\PY{l+s+s2}{\\PYZdq{}prefix:Analysis\\PYZus{}1563372854.3876536\\PYZdq{}}\n",
        "            \\PY{p}{\\PYZcb{}}\n",
        "          \\PY{p}{]}\\PY{p}{,}\n",
@@ -1637,9 +1637,9 @@
        "            {\n",
        "              \"@id\": \"Emotion0\",\n",
        "              \"@type\": \"Emotion\",\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
-       "              \"http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#arousal\": 6.44,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#dominance\": 7.11,\n",
+       "              \"http://www.gsi.upm.es/ontologies/onyx/vocabularies/anew/ns#valence\": 8.72,\n",
        "              \"prov:wasGeneratedBy\": \"prefix:Analysis_1563372854.3876536\"\n",
        "            }\n",
        "          ],\n",
diff --git a/docs/examples/results/example-pad.json b/docs/examples/results/example-pad.json
index 63beac8..57a119c 100644
--- a/docs/examples/results/example-pad.json
+++ b/docs/examples/results/example-pad.json
@@ -2,7 +2,7 @@
 "@context": [
              "http://mixedemotions-project.eu/ns/context.jsonld",
              {
-               "emovoc": "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns#"
+               "emovoc": "http://www.gsi.upm.es/ontologies/onyx/vocabularies/emotionml/ns#"
              }
   ],
   "@id": "me:Result1",
diff --git a/docs/index.rst b/docs/index.rst
index e7c8e06..ddd1212 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -67,7 +67,7 @@ You can analyze the same sentence using a different sentiment service (e.g. Vade
 
    @prefix :  .
    @prefix endpoint:  .
-   @prefix marl:  .
+   @prefix marl:  .
    @prefix nif:  .
    @prefix prefix:  .
    @prefix prov:  .
diff --git a/docs/installation.rst b/docs/installation.rst
index 983633a..53f79ba 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -49,7 +49,7 @@ To use your custom plugins, you can add volume to the container:
     
 .. code:: bash
 
-   docker run -ti -p 5000:5000 -v :/plugins gsiupm/senpy --host 0.0.0.0 --plugins -f /plugins
+   docker run -ti -p 5000:5000 -v :/plugins gsiupm/senpy --host 0.0.0.0 --plugins-folder /plugins
 
 
 Alias
diff --git a/docs/publications.rst b/docs/publications.rst
index a3cb4ea..f994aaf 100644
--- a/docs/publications.rst
+++ b/docs/publications.rst
@@ -2,7 +2,7 @@ Publications
 ============
 
 
-And if you use Senpy in your research, please cite `Senpy: A Pragmatic Linked Sentiment Analysis Framework `__ (`BibTex `__):
+And if you use Senpy in your research, please cite `Senpy: A Pragmatic Linked Sentiment Analysis Framework `__ (`BibTex `__):
 
 .. code-block:: text
 
diff --git a/docs/vocabularies.rst b/docs/vocabularies.rst
index e55ad36..eddf04a 100644
--- a/docs/vocabularies.rst
+++ b/docs/vocabularies.rst
@@ -13,9 +13,9 @@ An overview of the vocabularies and their use can be found in [4].
 
 [1] Guidelines for developing NIF-based NLP services, Final Community Group Report 22 December 2015 Available at: https://www.w3.org/2015/09/bpmlod-reports/nif-based-nlp-webservices/
 
-[2] Marl Ontology Specification, available at http://www.gsi.dit.upm.es/ontologies/marl/
+[2] Marl Ontology Specification, available at http://www.gsi.upm.es/ontologies/marl/
 
-[3] Onyx Ontology Specification, available at http://www.gsi.dit.upm.es/ontologies/onyx/
+[3] Onyx Ontology Specification, available at http://www.gsi.upm.es/ontologies/onyx/
 
 [4] Iglesias, C. A., Sánchez-Rada, J. F., Vulcu, G., & Buitelaar, P. (2017). Linked Data Models for Sentiment and Emotion Analysis in Social Networks. In Sentiment Analysis in Social Networks (pp. 49-69).
 
diff --git a/extra-requirements.txt b/extra-requirements.txt
index 1eac27a..59061d5 100644
--- a/extra-requirements.txt
+++ b/extra-requirements.txt
@@ -1 +1,2 @@
 gsitk>0.1.9.1
+flask_cors==3.0.10
diff --git a/k8s/senpy-ingress.yaml b/k8s/senpy-ingress.yaml
index c46c129..656ddb8 100644
--- a/k8s/senpy-ingress.yaml
+++ b/k8s/senpy-ingress.yaml
@@ -5,7 +5,7 @@ metadata:
   name: senpy-ingress
 spec:
   rules:
-  - host: latest.senpy.cluster.gsi.dit.upm.es
+  - host: latest.senpy.gsi.upm.es
     http:
       paths:
       - path: /
diff --git a/requirements.txt b/requirements.txt
index 72164ce..b26068b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,8 +7,7 @@ future
 jsonschema
 jsonref
 PyYAML
-rdflib
-rdflib-jsonld
+rdflib==6.1.1
 numpy
 scipy
 scikit-learn>=0.20
diff --git a/senpy/__main__.py b/senpy/__main__.py
index bb5d1d1..c08c03f 100644
--- a/senpy/__main__.py
+++ b/senpy/__main__.py
@@ -41,6 +41,11 @@ def main():
         type=str,
         default="INFO",
         help='Logging level')
+    parser.add_argument(
+        '--no-proxy-fix',
+        action='store_true',
+        default=False,
+        help='Do not assume senpy will be running behind a proxy (e.g., nginx)')
     parser.add_argument(
         '--log-format',
         metavar='log_format',
@@ -127,6 +132,12 @@ def main():
         action='store_true',
         default=False,
         help='Do not exit if some plugins fail to activate')
+    parser.add_argument(
+        '--enable-cors',
+        '--cors',
+        action='store_true',
+        default=False,
+        help='Enable CORS for all domains (requires flask-cors to be installed)')
     args = parser.parse_args()
     print('Senpy version {}'.format(senpy.__version__))
     print(sys.version)
@@ -141,6 +152,7 @@ def main():
 
     app = Flask(__name__)
     app.debug = args.debug
+
     sp = Senpy(app,
                plugin_folder=None,
                default_plugins=not args.no_default_plugins,
@@ -177,6 +189,14 @@ def main():
     print('Senpy version {}'.format(senpy.__version__))
     print('Server running on port %s:%d. Ctrl+C to quit' % (args.host,
                                                             args.port))
+    if args.enable_cors:
+        from flask_cors import CORS
+        CORS(app)
+
+    if not args.no_proxy_fix:
+        from werkzeug.middleware.proxy_fix import ProxyFix
+        app.wsgi_app = ProxyFix(app.wsgi_app)
+
     try:
         app.run(args.host,
                 args.port,
diff --git a/senpy/models.py b/senpy/models.py
index 5b42b86..42a336f 100644
--- a/senpy/models.py
+++ b/senpy/models.py
@@ -216,7 +216,7 @@ class BaseModel(with_metaclass(BaseMeta, CustomDict)):
             logger.debug(
                 'Parsing with prefix: {}'.format(kwargs.get('prefix')))
             content = g.serialize(format=format,
-                                  prefix=prefix).decode('utf-8')
+                                  prefix=prefix)
             mimetype = 'text/{}'.format(format)
         else:
             raise Error('Unknown outformat: {}'.format(format))
diff --git a/senpy/schemas/context.jsonld b/senpy/schemas/context.jsonld
index 7194262..6f274bd 100644
--- a/senpy/schemas/context.jsonld
+++ b/senpy/schemas/context.jsonld
@@ -5,10 +5,10 @@
     "senpy": "http://www.gsi.upm.es/onto/senpy/ns#",
     "prov": "http://www.w3.org/ns/prov#",
     "nif": "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#",
-    "marl": "http://www.gsi.dit.upm.es/ontologies/marl/ns#",
-    "onyx": "http://www.gsi.dit.upm.es/ontologies/onyx/ns#",
-    "wna": "http://www.gsi.dit.upm.es/ontologies/wnaffect/ns#",
-    "emoml": "http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns#",
+    "marl": "http://www.gsi.upm.es/ontologies/marl/ns#",
+    "onyx": "http://www.gsi.upm.es/ontologies/onyx/ns#",
+    "wna": "http://www.gsi.upm.es/ontologies/wnaffect/ns#",
+    "emoml": "http://www.gsi.upm.es/ontologies/onyx/vocabularies/emotionml/ns#",
     "xsd": "http://www.w3.org/2001/XMLSchema#",
     "fam": "http://vocab.fusepool.info/fam#",
     "topics": {
diff --git a/senpy/static/js/main.js b/senpy/static/js/main.js
index 0951bc2..605d2fd 100644
--- a/senpy/static/js/main.js
+++ b/senpy/static/js/main.js
@@ -1,4 +1,4 @@
-var ONYX = "http://www.gsi.dit.upm.es/ontologies/onyx/ns#";
+var ONYX = "http://www.gsi.upm.es/ontologies/onyx/ns#";
 var RDF_TYPE =  "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
 var plugins_params = default_params = {};
 var plugins = [];
diff --git a/senpy/static/js/nodes.js b/senpy/static/js/nodes.js
index dd844eb..943ed91 100644
--- a/senpy/static/js/nodes.js
+++ b/senpy/static/js/nodes.js
@@ -1,7 +1,7 @@
 ns = {
-    'http://www.gsi.dit.upm.es/ontologies/marl/ns#': 'marl',
-    'http://www.gsi.dit.upm.es/ontologies/onyx/ns#': 'onyx',
-    'http://www.gsi.dit.upm.es/ontologies/senpy/ns#': 'onyx',
+    'http://www.gsi.upm.es/ontologies/marl/ns#': 'marl',
+    'http://www.gsi.upm.es/ontologies/onyx/ns#': 'onyx',
+    'http://www.gsi.upm.es/ontologies/senpy/ns#': 'onyx',
     'http://www.gsi.upm.es/onto/senpy/ns#': 'senpy',
     'http://www.w3.org/ns/prov#': 'prov',
     'http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#': 'nif'
diff --git a/senpy/templates/index.html b/senpy/templates/index.html
index 055620e..535b347 100755
--- a/senpy/templates/index.html
+++ b/senpy/templates/index.html
@@ -326,7 +326,7 @@ In Data Science and Advanced Analytics (DSAA),
                     

- +
diff --git a/setup.py b/setup.py index 9fd2c76..8370354 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ extra_reqs = parse_requirements("extra-requirements.txt") setup( name='senpy', - python_requires='>3.3', + python_requires='>3.6', packages=['senpy'], # this must be the same as the name above version=__version__, description=('A sentiment analysis server implementation. ' @@ -67,7 +67,8 @@ setup( tests_require=test_reqs, setup_requires=['pytest-runner', ], extras_require={ - 'evaluation': extra_reqs + 'evaluation': extra_reqs, + 'extras': extra_reqs }, include_package_data=True, entry_points={ diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py index 4b5144b..783a466 100644 --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -292,7 +292,7 @@ class BlueprintsTest(TestCase): assert "@context" in js assert check_dict( js["@context"], - {"marl": "http://www.gsi.dit.upm.es/ontologies/marl/ns#"}) + {"marl": "http://www.gsi.upm.es/ontologies/marl/ns#"}) def test_schema(self): resp = self.client.get("/api/schemas/definitions.json") diff --git a/tests/test_extensions.py b/tests/test_extensions.py index 02e805e..838352e 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -69,8 +69,9 @@ class ExtensionsTest(TestCase): def test_adding_folder(self): """ It should be possible for senpy to look for plugins in more folders. """ + app = Flask('test_adding_folder') senpy = Senpy(plugin_folder=None, - app=self.app, + app=app, default_plugins=False) assert not senpy.analysis_plugins() senpy.add_folder(self.examples_dir) @@ -141,8 +142,9 @@ class ExtensionsTest(TestCase): def test_analyse_empty(self): """ Trying to analyse when no plugins are installed should raise an error.""" + app = Flask('test_adding_folder') senpy = Senpy(plugin_folder=None, - app=self.app, + app=app, default_plugins=False) self.assertRaises(Error, senpy.analyse, Results(), []) diff --git a/tests/test_semantics.py b/tests/test_semantics.py index 9fb90d3..9b685a7 100644 --- a/tests/test_semantics.py +++ b/tests/test_semantics.py @@ -75,9 +75,9 @@ class SemanticsTest(TestCase): assert g qres = g.query(""" PREFIX prov: - PREFIX marl: + PREFIX marl: PREFIX nif: - PREFIX onyx: + PREFIX onyx: PREFIX senpy: SELECT DISTINCT ?entry ?text ?sentiment @@ -109,9 +109,9 @@ class SemanticsTest(TestCase): g = parse_resp(resp, 'ttl') qres = g.query(""" PREFIX prov: - PREFIX marl: + PREFIX marl: PREFIX nif: - PREFIX onyx: + PREFIX onyx: PREFIX senpy: SELECT DISTINCT ?entry ?text ?sentiment