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.
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.
The input data consists simply of a single field which contains the text of the posts.
The next step is configuring the Sentiment Analysis block. Clicking on the block reveals the following 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.