Sentiment Analysis

Modified on Wed, 26 Feb 2020 at 02:11 PM

In Brief

Function: Given some text, this block finds the sentiment, i.e. the attitude with which the creator wrote the text. It produces a sentiment score in the range of -1 and 1. The sentiment score can be either positive for a positive sentiment, negative for a negative sentiment, or zero for a neutral sentiment.

Typical Use Case: A company would like to perform an analysis of text tweets about their company over time to discover whether their brand develops in a positive, or rather in a negative way.

Case Study

We are interested in the attitudes of people using newsgroups on the internet. We load the data and perform sentiment analysis on each sentence discovered in the posts.


We construct a workflow by connecting the newsgroup demo data to the Sentiment Analysis block.

Example Sentiment Analysis workflow
Example Sentiment Analysis workflow

Input Data

The input data consists simply of a single field which contains the text of the posts.

Newsgroup demo data
Newsgroup demo data


The next step is configuring the Sentiment Analysis block. Clicking on the block reveals the following options:

Sentiment Analysis options
Sentiment Analysis options

Fields to Use: Select here the text fields for which you would like to calculate a sentiment score.

Per sentence: Without this option checked, the block will calculate an average sentiment score for all text in a record. With this option checked, the text per record is split into sentences and the output will contain one sentiment per sentence.


The output contains the original fields of your input data together with a sentiment score. If “Per sentence” was checked in the options, then the output will contain another field specifying the sentence for which the sentiment was calculated.

Example output for Sentiment Analysis
Example output for Sentiment Analysis

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article