Sentiment node with differente languages

#1

Following the conversation that started in https://github.com/node-red/node-red/issues/1763
@knolleary Maybe could be an option the possibility to point to another npm for the affin based analysys rather than a hardcoded one. I 'm using this for example https://github.com/aristeuroriz/sentiment-ptbr

thanks

#2

Well that is “just” a fork of the original one but with Portuguese-Brazilian instead - so doesn’t exactly expand the node by much… maybe this would be a better library to look at - https://github.com/marcellobarile/multilang-sentiment ?

1 Like
#3

Looking a bit more a) that library does seem to be maintained… and b) it supports

“af”,“am”,“ar”,“az”,“be”,“bg”,“bn”,“bs”,“ca”,“ceb”,“co”,“cs”,“cy”,“da”,“de”,“el”,“en”,“eo”,“es”,“et”,“eu”,“fa”,“fi”, “fr”,“fy”,“ga”,“gd”,“gl”,“gu”,“ha”,“haw”,“hi”,“hmn”,“hr”,“ht”,“hu”,“hy”,“id”,“ig”,“is”,“it”,“iw”,“ja”,“jw”,“ka”,“kk”, “km”,“kn”,“ko”,“ku”,“ky”,“la”,“lb”,“lo”,“lt”,“lv”,“mg”,“mi”,“mk”,“ml”,“mn”,“mr”,“ms”,“mt”,“my”,“ne”,“nl”,“no”,“ny”, “pa”,“pl”,“ps”,“pt”,“ro”,“ru”,“sd”,“si”,“sk”,“sl”,“sm”,“sn”,“so”,“sq”,“sr”,“st”,“su”,“sv”,“sw”,“ta”,“te”,“tg”,“th”, “tl”,“tr”,“uk”,“ur”,“uz”,“vi”,“xh”,“yi”,“yo”,“zh-tw”,“zh”,“zu”

any good ? must admit I can’t see pt-br but as it’s maintained the author may be open to enhancements.

#4

Hi all.

Just to "close" the thread: I have been using node-red-contrib-npm-function with https://www.npmjs.com/package/sentiment-multi-language . It works like a charm.

cheers

#5

The sentiment node now supports multi languages using that library. The next release of core will drag it in

#6

hey there! tried to set msg.lang = 'pt' but the node still use english as the main language. any thoughts?