Natural Language Processing Sentiment Analysis and Text Classification 2 — Questions and Answers
Question 1: What is a lexicon-based approach to sentiment analysis?
- Using a pre-built dictionary of words labeled with their sentiment polarity scores to calculate overall text sentiment (Correct answer)
- Training a neural network on labeled sentiment data
- Using clustering to group texts by emotional tone
- Applying dependency parsing to identify opinion expressions
Correct answer: Using a pre-built dictionary of words labeled with their sentiment polarity scores to calculate overall text sentiment
Lexicon-based methods (e.g., VADER, SentiWordNet) assign sentiment scores from a curated word list and aggregate them to determine document-level sentiment without training data.
Question 2: What is multi-label text classification?
- Assigning multiple non-mutually exclusive labels to a single text, such as tagging a news article with several topics simultaneously (Correct answer)
- Classifying text into a large number of fine-grained categories
- Applying a different classifier for each sentence in a document
- Using an ensemble of binary classifiers for each class
Correct answer: Assigning multiple non-mutually exclusive labels to a single text, such as tagging a news article with several topics simultaneously
Multi-label classification allows a document to belong to multiple categories at once (e.g., an article tagged as both 'politics' and 'economy').
Question 3: What is opinion mining?
- Extracting subjective information such as opinions, evaluations, and emotions from text at scale (Correct answer)
- Mining text corpora for factual information about a topic
- Detecting plagiarism in documents
- Removing opinionated words from text before analysis
Correct answer: Extracting subjective information such as opinions, evaluations, and emotions from text at scale
Opinion mining (often used interchangeably with sentiment analysis) encompasses identifying opinion holders, targets, and polarity from large collections of user-generated content.
Question 4: How does class imbalance affect sentiment classification model training?
- A model trained on imbalanced data tends to be biased toward the majority class and performs poorly on minority classes (Correct answer)
- Class imbalance improves recall for the minority class
- It makes the model faster to train
- It has no effect if enough data is available overall
Correct answer: A model trained on imbalanced data tends to be biased toward the majority class and performs poorly on minority classes
When one sentiment class dominates, the model can achieve high accuracy by always predicting the majority class, so techniques like oversampling or weighted loss are needed.
Question 5: What is the SQuAD dataset commonly used for in NLP?
- Benchmarking extractive reading comprehension and question answering models (Correct answer)
- Evaluating sentiment classification accuracy
- Training named entity recognition systems
- Measuring machine translation quality
Correct answer: Benchmarking extractive reading comprehension and question answering models
The Stanford Question Answering Dataset (SQuAD) contains crowd-sourced question-answer pairs where answers are spans from Wikipedia passages.
Question 6: What does the macro-averaged F1 score measure in multi-class classification?
- The unweighted mean of per-class F1 scores, treating all classes equally regardless of their frequency (Correct answer)
- The F1 score weighted by the number of samples in each class
- The F1 score computed only on the majority class
- The harmonic mean of precision and recall across the full dataset
Correct answer: The unweighted mean of per-class F1 scores, treating all classes equally regardless of their frequency
Macro-average computes F1 for each class independently and averages them equally, making it sensitive to performance on rare classes.
What is a lexicon-based approach to sentiment analysis?