Natural Language Processing · Intermediate level

Intermediate level · Module 7 of 8 · 12 guided hours

Sentiment Analysis

Trained sentiment models: building labelled feedback data, training and evaluating TF-IDF classifiers, handling negation and aspects, comparing with lexicon and pretrained models, and reporting responsibly.

Learning objectives

  • Build and evaluate a trained sentiment classifier
  • Handle negation and aspect-level sentiment
  • Compare lexicon, trained and pretrained approaches on local text

Topics

  • labelling sentiment data and agreement
  • TF-IDF sentiment classifiers
  • negation handling with n-grams
  • aspect-based sentiment
  • pretrained sentiment models
  • evaluating on local text

Lessons

  1. Lesson 1 Building and Labelling Sentiment Data

    Learners create labelling guidelines, label synthetic feedback with a partner and measure agreement, because sentiment models are only as good as their labels.

    labelling guidelinesinter-annotator agreementCohen's kappaambiguous casesgold-standard test set

  2. Lesson 2 Training a Sentiment Classifier with Negation and Aspects

    Learners train a TF-IDF logistic regression sentiment model, use bigrams to handle negation, inspect influential words and extend it to simple aspect-level sentiment.

    logistic regression coefficientsnegation bigramsfeature inspectionaspect keywordssentence-level sentiment

  3. Lesson 3 Comparing Lexicon, Trained and Pretrained Sentiment Models

    Learners compare VADER, their trained classifier and a pretrained English transformer sentiment model on the gold test set, with separate results for local and mixed-language messages.

    lexicon baselinetrained modelpretrained transformer pipelineper-language resultscost and offline use

Practical activity

Build the project's sentiment component: labelled gold data, a trained model with negation and aspects, and a comparison with lexicon and pretrained models by language group.

Expected outcomes

  • Reliable, well-evaluated sentiment analysis
  • Honest comparison across approaches and languages

Assessment

Sentiment notebook (60%) and the comparison and recommendation note (40%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.