# Sentiment node with differente languages

**URL:** <https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791>\
**Category:** General\
**Created:** [13 June 2018 15:30 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791 "2018-06-13T15:30:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![deedos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deedos/32/236_2.png) [@deedos](https://discourse.nodered.org/u/deedos)\
**Post date:** [13 June 2018 15:30 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/1 "2018-06-13T15:30:47Z")

</div>

Following the conversation that started in [https://github.com/node-red/node-red/issues/1763](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](https://github.com/aristeuroriz/sentiment-ptbr)

thanks

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 June 2018 16:31 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/2 "2018-06-13T16:31:31Z")

</div>

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](https://github.com/marcellobarile/multilang-sentiment) ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 June 2018 21:36 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/3 "2018-06-13T21:36:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![deedos](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deedos/32/236_2.png) [@deedos](https://discourse.nodered.org/u/deedos)\
**Post date:** [11 December 2018 16:58 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/4 "2018-12-11T16:58:44Z")

</div>

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](https://www.npmjs.com/package/sentiment-multi-language) . It works like a charm.

cheers

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 December 2018 18:46 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/5 "2018-12-11T18:46:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![netomarchiori](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/netomarchiori/32/5375_2.png) [@netomarchiori](https://discourse.nodered.org/u/netomarchiori)\
**Post date:** [24 January 2019 13:49 UTC](https://discourse.nodered.org/t/sentiment-node-with-differente-languages/791/6 "2019-01-24T13:49:20Z")

</div>

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