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