gsi-upm / senpy-plugins-community

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

Currently "sentiment-basic" assumes text is Spanish, ignores "language" param #2

Open drevicko opened 7 years ago

drevicko commented 7 years ago

The calculation of sentiment of the analyse function appears to assume that the language is Spanish (see lines 79 and 84 of the analyse method).

Also, the "language" parameter, though extracted on line (116)[https://github.com/MixedEmotions/UPM_sentiment_and_emotion/blob/master/sentiment-basic/sentiment-basic.py#L116] is never used.

militarpancho commented 7 years ago

The repo was outdated. We changed it in this commit: https://github.com/gsi-upm/senpy-plugins-community/commit/5427b02a1a467ba08c66e312092ef9bd953624c4#diff-478193974a5b639c4e5549d70bf999b9L112, adding support for several language using TextBlob

drevicko commented 7 years ago

ok, that looks a lot better.

There is still a potential problem with pos tagging though, unless the pos tagger is multilingual, though the one bundled (unigram_spanish.pickle) looks like a spanish pos tagger.

However the pos tags don't appear to be used anywhere in the code except _compare_synsets(), which itself is not used anywhere, so it looks like it should work as expected.

Feel free to close this if you're happy with things as they are.

militarpancho commented 7 years ago

As you point, pos_tagger is not used. I will remove in next commits. Thanks for the info :+1: