4.1. Sentiment analysis on Twitter

4.1.3. Performing Sentiment Analysis

This is where our workflow becomes dense with metanodes. These metanodes are available via the NodeHub and are used to apply sentiment analysis. Roughly speaking, the metanodes in our workflow are used to perform four tasks: Tagging words for sentiment, counting the number of positive and negative tags per tweet, calculating a sentiment score and joining that score to the original data table.

The first metanode tags the words according to the selected lexicon, in our case, the MPQA sentiment lexicon included with the node. The second node compiles the number of positive and negative tags found within each document, with the third node normalizing the frequencies to a score between -1 and 1. The fourth metanode joins our sentiment scores with our original data table based on the Row ID we assigned to them through a connection to our first Table Manipulator node. Finally, we can inspect our tweets and their sentiment scores in the last Table Manipulator node.

xxx