Class: SentimentManager

SentimentManager()

Class for the sentiment anlysis manager, able to manage several different languages at the same time.

Constructor

new SentimentManager()

Constructor of the class.
Source:

Methods

addLanguage(locale) → {SentimentAnalyzer}

Adds a new analyzer by locale. If the locale analyzer already exists, then return the existing one.
Parameters:
Name Type Description
locale String Locale for the analyzer.
Source:
Returns:
Analyzer for the locale.
Type
SentimentAnalyzer

(async) process(locale, phrase) → {Promise.Object}

Process a phrase of a given locale, calculating the sentiment analysis.
Parameters:
Name Type Description
locale String Locale of the phrase.
phrase String Phrase to calculate the sentiment.
Source:
Returns:
Promise sentiment analysis of the phrase.
Type
Promise.Object