Exercise 2: Why Removing "Not" Is a Real, Serious Risk for Sentiment Analysis — Possible Solution ==================================================================== WHAT THE WARN-BOX CLAIMS DIRECTLY ------------------------------ Per this chapter, "a standard stopword list typically includes negation words like 'not.' Removing it from 'I do not like this movie' leaves something dangerously close to the opposite sentiment." A WORKED EXAMPLE ------------------------------ Take the sentence "I do not like this movie" and apply standard stopword removal, which per this chapter's own earlier material treats very common words as low-information and removes them. "I," "do," and "not" are all common enough to typically appear on a standard stopword list. Removing all three leaves just "like," "this," "movie" — and "like" here, stripped of the "not" that negated it, reads as a straightforwardly POSITIVE statement ("I like this movie") rather than the actual negative sentiment the original sentence expressed. WHY THIS IS THE OPPOSITE MEANING, NOT JUST A LOSS OF NUANCE ------------------------------ This isn't a case of losing some minor shade of meaning while the overall gist survives — the surviving tokens ("like," "movie") point in the EXACT OPPOSITE direction from the original sentence's own real sentiment. A sentiment classifier trained on bag-of-words-style features built from this stopword-stripped text would see essentially the same signal it would see for a genuinely positive review, and would have a real, serious risk of misclassifying a negative review as positive. WHY THIS IS SPECIFICALLY DANGEROUS FOR SENTIMENT ANALYSIS ------------------------------ Sentiment analysis's entire task is determining whether a piece of text expresses positive or negative feeling — negation words are precisely the mechanism by which a sentence flips from one to the other. A task like, say, topic classification (is this document about sports or politics?) might survive stopword removal relatively unharmed, since negation doesn't usually change what TOPIC a document is about. But for a task built entirely around detecting positive-vs-negative polarity, removing the exact words responsible for polarity flips is a uniquely damaging mistake — not a generic quality-of-data concern, but one that strikes directly at what the task is trying to measure. WHY THIS COUNTS AS "A REAL, WELL-DOCUMENTED TRAP," NOT A RARE EDGE CASE ------------------------------ Negation is an extremely common, ordinary feature of everyday language — "not," "isn't," "don't," "never," and similar words appear constantly in real text, especially in reviews and opinions, which is exactly the kind of text sentiment analysis is usually applied to. This isn't a rare or unusual sentence construction that might occasionally slip through — it's a routine pattern that a naive stopword-removal pipeline would mishandle constantly across a real, ordinary dataset. WHY THIS WORKS AS AN ANSWER ------------------------------ It works through the chapter's own example concretely, shows precisely how the surviving tokens after stopword removal reverse the sentence's own real meaning, and explains why this specific failure mode strikes directly at sentiment analysis's own core task rather than being a generic, low-stakes quality issue.