Skip to main content
Sentiment analysis

The Analyze Sentiment operation analyzes the sentiment of input text through deep learning or sentiment lexicons.

Tomas Larsson avatar
Written by Tomas Larsson
Updated over 10 months ago

Keywords: sentiment analysis, positive, negative, neutral, sentiment score, polarity

The Analyze Sentiment operation provides two approaches to analyze the sentiment of input text, one based on deep learning and one based on sentiment lexicons.

The Deep learning-based sentiment analysis method uses a character-level Recurrent Neural Network (RNN), which takes sequences of letters and words into account while predicting sentiment scores. RNNs are very powerful at understanding the effects of adjectives and intensifiers on the sentiment score, and less vulnerable to typos in the text. The model is trained to understand the English text.

Sentiment lexicon-based sentiment analysis uses lexicons with polarity values for approximately 100,000 frequently used words for each language. The Sentence-level sentiment score is defined as the average polarity of all non-neutral words in a sentence. While not as powerful as deep learning-based sentiment analysis, it is available for 115 languages, runs fast, and is usually sufficient for measuring sentiment on an aggregated level and for identifying strongly positive and negative pieces of text.

Step-by-step guide

1. Open the operation configuration window

Select the field with the text that you want to analyze sentiment in and click the "Add operation" button at the top of the workspace.
โ€‹

Search for "Analyze sentiment" or find the operation under "Text enrichment" and click it.

2. Select the sentiment analysis method

Two options are available: "Deep learning" and "Sentiment lexicons". See the description of each method above.


โ€‹

3. Specify the text language

In the "Language" drop-down, specify the language of the input text. In case the dataset contains text in different languages, first apply language detection, and specify the resulting language field in the "Language source" drop-down.

4. Name the output field

Under "Output field name", type the name of the output field.

5. Apply the operation

Click "Apply" to run the operation. The new "score" field contains the average text-level sentiment score on a scale from -1 (strongly negative) to +1 (strongly positive). The new "label" field contains a sentiment label for each text: neural (when the sentiment score is 0), positive (for positive sentiment scores), negative (for negative sentiment scores), or unknown (for unsupported languages).

Did this answer your question?