Case Study

Use Preprocessing to Highlight Important Words in Sentiment Classification

Case context: A group builds a sentiment model that reads product reviews as plain text. It does not use any linguistic preprocessing, so it may treat all words as equally important. In the review "That lamp is surprisingly bright and quiet," the model sometimes misses that words like "bright" and "quiet" carry most of the sentiment signal.

Question: What change should the team make to the input pipeline, and how would that change help the model focus on important words?

Sample answer: The team should add a parsing or tagging step before the sentiment model. That step can label words by role, such as marking "bright" and "quiet" as descriptive words and "lamp" as a noun. Once the text is annotated, the classifier can place more weight on the descriptive words that matter for sentiment and less weight on routine words, which should improve predictions.

Key points:

  • The pipeline should include a parser or tagger before classification.
  • The preprocessing step adds linguistic labels to the text.
  • Those labels help the classifier emphasize sentiment-bearing words.
  • Words with little sentiment value should receive less influence.

Rubric: Full credit: response identifies the need for a parser or similar preprocessing step, explains that it annotates the text with linguistic information, and connects that annotation to better weighting of important sentiment words. Partial credit: response says to add preprocessing but does not explain why it helps. No credit: response does not identify the missing parsing/tagging step.

0

1

Updated 2026-08-12

Contributors are:

Who are from:

Tags

Machine Learning

Deep Learning

Supervised Learning

Dive into Deep Learning @ D2L

Data Science

Machine Learning Strategy

Machine Learning Yearning @ DeepLearning.AI