Icon

Deploying Sentiment Predictor - Lexicon Based

Deploying Sentiment Analysis Predictive Model - Lexicon Based Approach

This worflow applies the lexicon based approach on new tweets to predict their sentiment. The last component visualizes (1) the bar chart with the number of negative/positive/neutral tweets, (2) the word cloud of all collected tweets, and (3) the table with all collected tweets.

If you use this workflow, please cite:
F. Villaroel Ordenes & R. Silipo, “Machine learning for marketing on the KNIME Hub: The development of a live repository for marketing applications”, Journal of Business Research 137(1):393-410, DOI: 10.1016/j.jbusres.2021.08.036.

Deploying Sentiment Analysis Predictive Model - Lexicon Based Approach

This worflow applies the lexicon based approach on unlabeled social media posts to predict their sentiment. The last component visualizes (1) the bar chart with the number of negative/positive/neutral posts, (2) the word cloud of all collected posts, and (3) the table with all collected posts.

1. Read unlabeled, compatible social media posts.

2. Data Manipulation/Preparation.

Here the most important node is Strings to Document, which formats sevaral string columns (e.g., author, text, title) into a single document that can be text-mined in KNIME.

6. Visualize data. (1) bar chart of # positive, negative, and neutral posts; (2) word cloud; and (3) table with posts.

3. Use Text Mining to Tag Words with Positive and Negative Meaning based on a Dictionary.

4. Count the Number of Positive and Negative Words per Document.

5. Calculate a Sentiment Score based on the Number of Positive and Negative Words and Classify Documents based on the Score.

The sentiment score is calculated by (number of postive words - number of negative words) divided by (number of postive words + number of negative words).

If the score is negative, the post is classified as negative; if the score is positive, it is classified as positive; and if it is equal to 0, the post is classified as neutral.

Document Data Extractor
Acquire unlabeledsocial media posts
Call Workflow Service
MPQA Dictionary
Excel Reader
Number of Positive and Negative Words per Post
Calculate Sentiment Score &Predict sentiment based on score
Expression
Duplicate Row Filter
negative
Dictionary Tagger
positive
Dictionary Tagger
Convert strings to to documents
Strings to Document
keep only tagged words
Tag Filter
Visualization

Nodes

Extensions

Links